Skip to content

Commit bc55fe2

Browse files
committed
Merge branch 'stable-1.4'
2 parents b98f611 + 24ed11d commit bc55fe2

File tree

3 files changed

+58
-24
lines changed

3 files changed

+58
-24
lines changed

gap/utils.gi

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,26 @@ end);
140140
InstallGlobalFunction(DigraphsTestStandard,
141141
function(arg)
142142
local opts, dir;
143-
if Length(arg) = 1 and IsRecord(arg[2]) then
144-
opts := arg[1];
143+
if Length(arg) = 1 and IsRecord(arg[1]) then
144+
opts := ShallowCopy(arg[1]);
145145
elif Length(arg) <> 0 then
146146
ErrorNoReturn("there must be no arguments, or the argument ",
147147
"must be a record");
148148
else
149-
opts := rec(suppressStatusMessage := true,
150-
earlyStop := true,
151-
testOptions := rec(showProgress := false));
149+
opts := rec();
150+
fi;
151+
152+
if not IsBound(opts.suppressStatusMessage) then
153+
opts.suppressStatusMessage := true;
154+
fi;
155+
if not IsBound(opts.earlyStop) then
156+
opts.earlyStop := true;
157+
fi;
158+
if not IsBound(opts.testOptions) or not IsRecord(opts.testOptions) then
159+
opts.testOptions := rec();
160+
fi;
161+
if not IsBound(opts.testOptions.showProgress) then
162+
opts.testOptions.showProgress := false;
152163
fi;
153164

154165
dir := DirectoriesPackageLibrary("digraphs", "tst/standard/");
@@ -170,15 +181,29 @@ function(arg)
170181
"and try again,");
171182
fi;
172183

173-
if Length(arg) = 1 and IsRecord(arg[2]) then
174-
opts := arg[1];
184+
if Length(arg) = 1 and IsRecord(arg[1]) then
185+
opts := ShallowCopy(arg[1]);
175186
elif Length(arg) <> 0 then
176187
ErrorNoReturn("there must be no arguments, or the argument ",
177188
"must be a record");
178189
else
179-
opts := rec(suppressStatusMessage := true,
180-
earlyStop := true,
181-
testOptions := rec(showProgress := "some"));
190+
opts := rec();
191+
fi;
192+
193+
if not IsBound(opts.suppressStatusMessage) then
194+
opts.suppressStatusMessage := true;
195+
fi;
196+
if not IsBound(opts.earlyStop) then
197+
opts.earlyStop := true;
198+
fi;
199+
if not IsBound(opts.testOptions) or not IsRecord(opts.testOptions) then
200+
opts.testOptions := rec();
201+
fi;
202+
if not IsBound(opts.testOptions.showProgress) then
203+
opts.testOptions.showProgress := false;
204+
fi;
205+
if not IsBound(opts.testOptions.showProgress) then
206+
opts.suppressStatusMessage := "some";
182207
fi;
183208

184209
dir := DirectoriesPackageLibrary("digraphs", "tst/extreme/");

tst/testall.g

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
LoadPackage("digraphs");
2-
3-
DigraphsMakeDoc();
4-
if DigraphsTestInstall()
5-
and DigraphsTestStandard()
6-
and DIGRAPHS_RunTest(DigraphsTestManualExamples)
7-
and DigraphsTestExtreme() then
8-
FORCE_QUIT_GAP(0);
1+
#############################################################################
2+
##
3+
#W testall.g
4+
#Y Copyright (C) 2021 Wilf A. Wilson
5+
##
6+
## Licensing information can be found in the README file of this package.
7+
##
8+
#############################################################################
9+
##
10+
LoadPackage("digraphs", false);;
11+
opts := rec(earlyStop := false);
12+
if SizeBlist([DigraphsTestInstall(),
13+
DigraphsTestStandard(opts),
14+
DIGRAPHS_RunTest(DigraphsTestManualExamples),
15+
DigraphsTestExtreme(opts)]) = 4 then
16+
QUIT_GAP(0);
17+
else
18+
QUIT_GAP(1);
919
fi;
10-
11-
FORCE_QUIT_GAP(1);
20+
FORCE_QUIT_GAP(1); # if we ever get here, there was an error

tst/teststandard.g

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
#############################################################################
99
##
1010
LoadPackage("digraphs", false);;
11-
# These "{No} errors detected" lines currently have to be printed in this way
11+
# The "{No} errors detected" lines currently have to be printed in this way
1212
# to satisfy the automated GAP testing system that runs on Jenkins.
1313
# This requirement will hopefully go soon.
14-
if DigraphsTestInstall()
15-
and DigraphsTestStandard()
16-
and DIGRAPHS_RunTest(DigraphsTestManualExamples) then
14+
if SizeBlist([DigraphsTestInstall(),
15+
DigraphsTestStandard(rec(earlyStop := false)),
16+
DIGRAPHS_RunTest(DigraphsTestManualExamples)]) = 3 then
1717
Print("#I No errors detected while testing\n\n");
1818
QUIT_GAP(0);
1919
else

0 commit comments

Comments
 (0)