Merge remote-tracking branch 'upstream/master' into issue-2588

This commit is contained in:
Bennet Bleßmann
2024-10-04 19:11:26 +02:00
218 changed files with 22575 additions and 7754 deletions

View File

@@ -0,0 +1 @@
:- op(10, moin, example).

View File

@@ -0,0 +1 @@
:- op(10, xf, [example, test]).

View File

@@ -0,0 +1 @@
:- op(10, xf, [example, Var]).

View File

@@ -0,0 +1 @@
:- op(500, xfy, {}).

View File

@@ -0,0 +1 @@
:- op(500, xfy, [{}]).

View File

@@ -0,0 +1 @@
:- op(1000, xfy, '|').

View File

@@ -0,0 +1 @@
:- op(1150, fx, '|').

View File

@@ -0,0 +1 @@
:- op(500, yfx, ',').

View File

@@ -0,0 +1 @@
:- op(4000, xfx, example).

View File

@@ -0,0 +1 @@
:- op(5, xfx, example(a,b)).

View File

@@ -0,0 +1 @@
:- op(5, xfx, example, too_many_arguments).

View File

@@ -0,0 +1 @@
:- (test -> set_prolog_flag(double_quotes, codes); true).

View File

@@ -0,0 +1 @@
:- 9001.

View File

@@ -0,0 +1 @@
:- op(10, 42, example).

View File

@@ -0,0 +1 @@
:- op(10, Var, example).

View File

@@ -0,0 +1 @@
:- op(Var, xf, example).

View File

@@ -0,0 +1 @@
:- D.

View File

@@ -230,13 +230,16 @@ test_61 :- integer('-'/*.*/1).
test_62 :- atom(-/*.*/-).
test_63_180_64 :- setup_call_cleanup(( current_op(P,fy,-),
op(0,fy,-)
),
( integer(-1),
integer(- 1)
),
op(P,fy,-)).
test_63_180_64_328 :- setup_call_cleanup(( current_op(P,fy,-),
op(0,fy,-)
),
( integer(-1),
integer(- 1),
read_from_chars("writeq_term_to_chars([-]).", Writer),
call(Writer, Cs),
Cs == "[-]"
),
op(P,fy,-)).
test_135 :- writeq_term_to_chars(-(1), Chars),
Chars == "- (1)".
@@ -783,10 +786,10 @@ test_217_181_290_317 :-
( op(1105,xfy,'|'),
read_from_chars("(a-->b,c|d).", T0),
writeq_term_to_chars(T0, C0),
C0 == "a-->b,c | d",
C0 == "a-->b,c|d",
read_from_chars("[(a|b)].", T1),
writeq_term_to_chars(T1, C1),
C1 == "[(a | b)]",
C1 == "[(a|b)]",
read_from_chars("[a,(b,c)|[]].", T2),
writeq_term_to_chars(T2, C2),
C2 == "[a,(b,c)]"
@@ -1005,6 +1008,18 @@ test_311 :- test_syntax_error("Finis ().", syntax_error(incomplete_reduction)).
test_318 :- writeq_term_to_chars(+((1*2)^3), C),
C == "+ (1*2)^3".
test_320 :- writeq_term_to_chars([a|\+2], C),
C == "[a|\\+2]".
test_321 :- test_syntax_error("writeq((a)(b)).", syntax_error(incomplete_reduction)).
test_324 :- writeq_term_to_chars('%', C),
C == "'%'".
test_325 :- test_syntax_error("writeq({[y}]).", syntax_error(incomplete_reduction)).
test_326 :- test_syntax_error("(>)(1,2).", syntax_error(incomplete_reduction)).
run_tests([Test|Tests]) -->
( { call(Test) } ->
[]

View File

@@ -0,0 +1,3 @@
:- use_module(issue2361_m).
:- initialization(gs([(length("a",_),length("ab",_))])).

8
tests-pl/issue2361_m.pl Normal file
View File

@@ -0,0 +1,8 @@
:- module(m, [gs/1]).
:- use_module(library(lists)).
gs([]).
gs([G|Gs]) :-
G,
gs(Gs).

View File

@@ -1,4 +0,0 @@
% hello
% line!
a :- b(X).

View File

@@ -1,3 +0,0 @@
test :- write(world), nl.
:- initialization(write(hello)).

View File

@@ -1 +0,0 @@
:- op(900, fy, [$,@]).

View File

@@ -1,3 +0,0 @@
:- set_prolog_flag(occurs_check, true).
f(X, g(X)).

View File

@@ -1 +0,0 @@
:- initialization(throw(e)).