add test for declaration errors
This commit is contained in:
1
tests-pl/invalid_decl1.pl
Normal file
1
tests-pl/invalid_decl1.pl
Normal file
@@ -0,0 +1 @@
|
||||
:- op(10, moin, example).
|
||||
1
tests-pl/invalid_decl2.pl
Normal file
1
tests-pl/invalid_decl2.pl
Normal file
@@ -0,0 +1 @@
|
||||
:- op(4000, xfx, example).
|
||||
1
tests-pl/invalid_decl3.pl
Normal file
1
tests-pl/invalid_decl3.pl
Normal file
@@ -0,0 +1 @@
|
||||
:- op(5, xfx, example(a,b)).
|
||||
1
tests-pl/invalid_decl4.pl
Normal file
1
tests-pl/invalid_decl4.pl
Normal file
@@ -0,0 +1 @@
|
||||
:- op(5, xfx, example, too_many_arguments).
|
||||
1
tests-pl/invalid_decl5.pl
Normal file
1
tests-pl/invalid_decl5.pl
Normal file
@@ -0,0 +1 @@
|
||||
:- (test -> set_prolog_flag(double_quotes, codes); true).
|
||||
1
tests-pl/invalid_decl6.pl
Normal file
1
tests-pl/invalid_decl6.pl
Normal file
@@ -0,0 +1 @@
|
||||
:- 9001.
|
||||
1
tests-pl/invalid_decl7.pl
Normal file
1
tests-pl/invalid_decl7.pl
Normal file
@@ -0,0 +1 @@
|
||||
:- op(10, 42, example).
|
||||
35
tests/scryer/cli/src_tests/declaration_errors.md
Normal file
35
tests/scryer/cli/src_tests/declaration_errors.md
Normal file
@@ -0,0 +1,35 @@
|
||||
```trycmd
|
||||
$ scryer-prolog -f --no-add-history tests-pl/invalid_decl1.pl -g halt
|
||||
error(syntax_error(inconsistent_entry),load/1).
|
||||
|
||||
```
|
||||
|
||||
```trycmd
|
||||
$ scryer-prolog -f --no-add-history tests-pl/invalid_decl2.pl -g halt
|
||||
error(syntax_error(inconsistent_entry),load/1).
|
||||
|
||||
```
|
||||
|
||||
```trycmd
|
||||
$ scryer-prolog -f --no-add-history tests-pl/invalid_decl3.pl -g halt
|
||||
error(syntax_error(inconsistent_entry),load/1).
|
||||
|
||||
```
|
||||
|
||||
```trycmd
|
||||
$ scryer-prolog -f --no-add-history tests-pl/invalid_decl4.pl -g halt
|
||||
error(syntax_error(inconsistent_entry),load/1).
|
||||
|
||||
```
|
||||
|
||||
```trycmd
|
||||
$ scryer-prolog -f --no-add-history tests-pl/invalid_decl5.pl -g halt
|
||||
error(syntax_error(inconsistent_entry),load/1).
|
||||
|
||||
```
|
||||
|
||||
```trycmd
|
||||
$ scryer-prolog -f --no-add-history tests-pl/invalid_decl6.pl -g halt
|
||||
error(syntax_error(inconsistent_entry),load/1).
|
||||
|
||||
```
|
||||
@@ -23,5 +23,6 @@ fn cli_tests() {
|
||||
.default_bin_name("scryer-prolog")
|
||||
.case("tests/scryer/cli/issues/*.toml")
|
||||
.skip("tests/scryer/cli/issues/singleton_warning.toml") // wrong line number
|
||||
.case("tests/scryer/cli/src_tests/*.toml");
|
||||
.case("tests/scryer/cli/src_tests/*.toml")
|
||||
.case("tests/scryer/cli/src_tests/*.md");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user