Files
mercury/tests/debugger/interactive.inp
Zoltan Somogyi 0f2726ee1a Fix some test case failures.
Estimated hours taken: 0.5
Branches: main

Fix some test case failures.

browser/interactive_query.m:
	Flush the output stream before invoking the compiler, to ensure that
	the output appears in the desired order.

tests/debugger/interactive.{inp,exp}:
	Test only the interactive commands of mdb. The other commands are well
	exercised by the other test cases; duplicating them only leads to
	double maintenance of the expected outputs.
2002-09-27 03:11:10 +00:00

23 lines
794 B
Plaintext

query interactive list
append(X, Y, ['a', 'b', 'c']).
qperm([1,2,3], List).
qperm([1,2,3], List), List = [2 | _].
qperm([1,2,3], List), List = [4 | _].
qperm([1,2,"foo"], List).
qperm(List, [1]).
quit.
cc_query interactive list
append(X, Y, ['a', 'b', 'c']).
qperm([1,2,3], List).
qperm([1,2,3], List), List = [2 | _].
qperm([1,2,3], List), List = [4 | _].
quit.
io_query interactive list
main.
if { append(X, Y, ['a', 'b', 'c']) } then print("X = "), print(X), print(", Y = "), print(Y), nl else print("No solution\n").
if { qperm([1,2,3], List) } then print(List), nl else [].
if { qperm([1,2,3], List), List = [2 | _] } then print(List), nl else { true }.
if { qperm([1,2,3], List), List = [4 | _] } then print(List), nl else print("No solution, as expected."), io__nl.
quit.
continue -n -S