Files
scryer-prolog/tests/scryer/main.rs
David Farrell f509d3d66f Line numbers start at 1
Bumps the line number for the singleton warning. When the singleton
occurs on the same line at the term starts, the line number is correct:

    foo(X).

However it stills mis-reports this line number as 1 instead of 5:

    foo(1) :-
        true,
        true,
        true,
        Y.

See issue #1356.
2025-02-02 08:16:05 -05:00

28 lines
1.2 KiB
Rust

mod helper;
mod issues;
mod src_tests;
/// To add new cli test copy an existing .toml file in `tests/scryer/cli/issues/` or `tests/scryer/cli/issues/src_tests/`,
/// adjust as necessary the `-f` and `--no-add-history` args should be kept but additional args may be added.
/// For input on stdin add a .stdin file with the same filename.
/// Then to generate new reference output files into dump/ run `TRYCMD=dump cargo test -- cli_test`
/// check that the output in the .stdout and .stderr file is as expected, then move them next to the .toml file.
///
/// If a test does not have a .stderr or .stdout the corresponding output is ignored i.e. any and no output is accepted
///
/// to re-generate all reference output files run `TRYCMD=overwrite cargo test -- cli_test`
/// then check that the changes are as expected e.g. by looking at the `git diff`
#[test]
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
#[cfg_attr(
miri,
ignore = "miri isolation, unsupported operation: can't call foreign function"
)]
fn cli_tests() {
trycmd::TestCases::new()
.default_bin_name("scryer-prolog")
.case("tests/scryer/cli/issues/*.toml")
.case("tests/scryer/cli/src_tests/*.toml")
.case("tests/scryer/cli/src_tests/*.md");
}