Skip to content

Commit

Permalink
use doctestfilters also in GAP's Test
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBreuer authored and fingolfin committed Jul 17, 2020
1 parent b9faed5 commit 08cac82
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion pkg/JuliaInterface/tst/testall.g
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@
LoadPackage("JuliaInterface");
dir:=DirectoriesPackageLibrary("JuliaInterface", "tst");
Assert(0, dir <> fail);

CompareUpToWhitespaceAndMatches:= function( pairs )
return function( a, b )
local pair;

a:= ShallowCopy( a );
b:= ShallowCopy( b );
for pair in pairs do
if ForAll( [ a, b ],
str -> ForAny( pair,
x -> PositionSublist( str, x ) <> fail ) ) then
a:= ReplacedString( a, pair[1], "" );
a:= ReplacedString( a, pair[2], "" );
b:= ReplacedString( b, pair[1], "" );
b:= ReplacedString( b, pair[2], "" );
fi;
od;
return TEST.compareFunctions.uptowhitespace( a, b );
end;
end;

# Several Julia types are shown differently in Julia 1.6.0-DEV
# and older Julia versions.
compare:= CompareUpToWhitespaceAndMatches(
[ [ "Array{Any,1}", "Vector{Any}" ] ] );

TestDirectory(dir, rec(exitGAP := true,
testOptions := rec(compareFunction := "uptowhitespace") ) );
testOptions := rec(compareFunction := compare) ) );
FORCE_QUIT_GAP(1);

0 comments on commit 08cac82

Please sign in to comment.