File-oriented testing

inspired by #2191 but for the `run_top_level_test_with_args`s and  `run_top_level_test_no_args instead of the `load_module_test`s
This commit is contained in:
Skgland
2023-12-04 22:00:52 +01:00
committed by Bennet Bleßmann
parent eddcdaabef
commit 1c52de9ab1
62 changed files with 427 additions and 239 deletions

View File

@@ -0,0 +1 @@
helloworld

View File

@@ -0,0 +1,3 @@
# issue 820
args = ["-f", "--no-add-history", "-g", "test,halt", "tests-pl/issue820-goals.pl"]
binary = true

View File

@@ -0,0 +1,5 @@
X = 1.
use_module(library(dif)).
X = 1.
dif(X,1).
halt.

View File

@@ -0,0 +1,4 @@
X = 1.
true.
X = 1.
dif:dif(X,1).

View File

@@ -0,0 +1,3 @@
# issue 857
args = ["-f", "--no-add-history"]
binary = true

View File

@@ -0,0 +1,3 @@
['tests-pl/issue852-throw_e.pl'].
['tests-pl/issue852-throw_e.pl'].
halt.

View File

@@ -0,0 +1,2 @@
throw(e).
throw(e).

View File

@@ -0,0 +1,3 @@
# issue 852
args = ["-f", "--no-add-history"]
binary = true

View File

@@ -0,0 +1,11 @@
use_module(library(dif)).
use_module(library(atts)).
-X\=X.
-X=X.
dif(-X,X).
dif(-X,X), -X=X.
call_residue_vars(dif(-X,X), Vars).
set_prolog_flag(occurs_check, true).
-X\=X.
dif(-X,X).
halt.

View File

@@ -0,0 +1,10 @@
true.
true.
false.
X = -X.
dif:dif(-X,X).
false.
Vars = [X], dif:dif(-X,X).
true.
true.
true.

View File

@@ -0,0 +1,3 @@
# issue 844
args = ["-f", "--no-add-history"]
binary = true

View File

@@ -0,0 +1,2 @@
use_module(library(freeze)), freeze(X,false), X \=a.
halt.

View File

@@ -0,0 +1 @@
freeze:freeze(X,false).

View File

@@ -0,0 +1,3 @@
# issue 807
args = ["-f", "--no-add-history"]
binary = true

View File

@@ -0,0 +1 @@
helloworld

View File

@@ -0,0 +1,3 @@
# issue 820
args = ["-f", "--no-add-history", "-g", "test", "-g", "halt", "tests-pl/issue820-goals.pl"]
binary = true

View File

@@ -0,0 +1,2 @@
write(a), write(b), false.
halt.

View File

@@ -0,0 +1 @@
ab false.

View File

@@ -0,0 +1,3 @@
# issue 815
args = ["-f", "--no-add-history"]
binary = true

View File

@@ -0,0 +1,2 @@
f(X, X).
halt.

View File

@@ -0,0 +1 @@
false.

View File

@@ -0,0 +1,3 @@
# issue 841
args = ["-f", "--no-add-history", "tests-pl/issue841-occurs-check.pl"]
binary = true

View File

@@ -0,0 +1,6 @@
set_prolog_flag(occurs_check, true).
X = -X.
asserta(f(X,g(X))).
f(X,X).
X-X = X-g(X).
halt.

View File

@@ -0,0 +1,5 @@
true.
false.
true.
false.
false.

View File

@@ -0,0 +1,3 @@
# issue 841
args = ["-f", "--no-add-history"]
binary = true

View File

View File

View File

@@ -0,0 +1,3 @@
# issue 839
args = ["-f", "--no-add-history", "tests-pl/issue839-op3.pl", "-g", "halt"]
binary = true

View File

@@ -0,0 +1,2 @@
['tests-pl/issue812-singleton-warning.pl'].
halt.

View File

@@ -0,0 +1,2 @@
Warning: singleton variables X at line 4 of issue812-singleton-warning.pl
true.

View File

@@ -0,0 +1,3 @@
# issue 812
args = ["-f", "--no-add-history"]
binary = true

View File

@@ -0,0 +1 @@
All tests passed

View File

@@ -0,0 +1,2 @@
args = ["-f", "--no-add-history", "src/tests/acyclic_term.pl", "-f", "-g", "main_quiet"]
binary = true

View File

@@ -0,0 +1 @@
All tests passed

View File

@@ -0,0 +1,2 @@
args = ["-f", "--no-add-history", "src/tests/dif.pl", "-f", "-g", "main_quiet"]
binary = true

View File

@@ -0,0 +1 @@
All tests passed

View File

@@ -0,0 +1,2 @@
args = ["-f", "--no-add-history", "src/tests/ground.pl", "-f", "-g", "main_quiet"]
binary = true

View File

@@ -0,0 +1 @@
1+21+31+2>A+B1+G1+2>41+2>B1+2>31+2>31+2>4ba

View File

@@ -0,0 +1,2 @@
args = ["-f", "--no-add-history", "src/tests/setup_call_cleanup.pl", "-f", "-g", "halt"]
binary = true

View File

@@ -0,0 +1 @@
All tests passed

View File

@@ -0,0 +1,2 @@
args = ["-f", "--no-add-history", "src/tests/term_variables.pl", "-f", "-g", "main_quiet"]
binary = true