File: gap.tst

package info (click to toggle)
gap 4r10p0-7
  • links: PTS
  • area: main
  • in suites: buster
  • size: 47,392 kB
  • sloc: ansic: 118,475; xml: 54,089; sh: 4,112; perl: 1,654; makefile: 274
file content (193 lines) | stat: -rw-r--r-- 5,380 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
#
gap> SHELL();
Error, SHELL takes 10 arguments
gap> SHELL(1,2,3,4,5,6,7,8,9,10);
Error, SHELL: 1st argument should be a local variables bag
gap> lvars:=GetCurrentLVars();
<lvars bag>
gap> SHELL(lvars,2,3,4,5,6,7,8,9,10);
Error, SHELL: 2nd argument (can return void) should be true or false
gap> SHELL(lvars,true,3,4,5,6,7,8,9,10);
Error, SHELL: 3rd argument (can return object) should be true or false
gap> SHELL(lvars,true,true,fail,5,6,7,8,9,10);
Error, SHELL: 4th argument (last depth) should be a small integer
gap> SHELL(lvars,true,true,-1,5,6,7,8,9,10);
#W SHELL: negative last depth treated as zero
Error, SHELL: 5th argument (set time) should be true or false
gap> SHELL(lvars,true,true,4,5,6,7,8,9,10);
#W SHELL: last depth greater than 3 treated as 3
Error, SHELL: 5th argument (set time) should be true or false
gap> SHELL(lvars,true,true,0,5,6,7,8,9,10);
Error, SHELL: 5th argument (set time) should be true or false
gap> SHELL(lvars,true,true,0,false,6,7,8,9,10);
Error, SHELL: 6th argument (prompt) must be a string of length at most 80 char\
acters
gap> SHELL(lvars,true,true,0,false,"abc",7,8,9,10);
Error, SHELL: 7th argument (preCommandHook) must be function or false
gap> SHELL(lvars,true,true,0,false,"abc",false,8,9,10);
Error, SHELL: 8th argument (infile) must be a string
gap> SHELL(lvars,true,true,0,false,"abc",false,"",9,10);
Error, SHELL: 9th argument (outfile) must be a string
gap> SHELL(lvars,true,true,0,false,"abc",false,"","",10);
Error, SHELL: 10th argument (catch QUIT) should be true or false
gap> SHELL(lvars,true,true,0,false,"abc",false,"","",false);
Error, SHELL: can't open outfile 

#
gap> l:=RUNTIMES();; List(l,IsInt);
[ true, true, true, true ]

#
gap> RecNames(NanosecondsSinceEpochInfo());
[ "Method", "Monotonic", "Resolution", "Reliable" ]

#
gap> List(SizeScreen(), IsPosInt);
[ true, true ]
gap> SizeScreen(100, 100);
Error, Function: number of arguments must be 0 or 1 (not 2)
gap> SizeScreen(100);
Error, SizeScreen: <size> must be a list of length 2
gap> SizeScreen([fail,fail]);
Error, SizeScreen: <x> must be an integer
gap> SizeScreen([100,fail]);
Error, SizeScreen: <y> must be an integer

#
gap> WindowCmd(fail);
Error, argument list must be a list (not a boolean or fail)
gap> WindowCmd([]);
Error, List Element: <list>[1] must have an assigned value
gap> WindowCmd([fail]);
Error, <cmd> must be a string (not a boolean or fail)
gap> WindowCmd([""]);
Error, <cmd> must be a string of length 3
gap> WindowCmd(["abc",fail]);
Error, 2. argument must be a string or integer (not a boolean or fail)
gap> WindowCmd(["abc"]);
Error, window system: No Window Handler Present
gap> WindowCmd(["abc",1,"foo"]);
Error, window system: No Window Handler Present

#
gap> DownEnv();
not in any function
gap> DownEnv(1);
not in any function
gap> DownEnv(1,2);
Error, usage: DownEnv( [ <depth> ] )
gap> DownEnv(fail);
Error, usage: DownEnv( [ <depth> ] )

#
gap> UpEnv();
not in any function
gap> UpEnv(1);
not in any function
gap> UpEnv(1,2);
Error, usage: UpEnv( [ <depth> ] )
gap> UpEnv(fail);
Error, usage: UpEnv( [ <depth> ] )

#
gap> CURRENT_STATEMENT_LOCATION(GetCurrentLVars());
fail
gap> PRINT_CURRENT_STATEMENT("*errout*", GetCurrentLVars());
gap> f:=function() PRINT_CURRENT_STATEMENT("*errout*", GetCurrentLVars()); Print("\n"); end;; f();
PRINT_CURRENT_STATEMENT( "*errout*", GetCurrentLVars(  ) ); at stream:1

#
gap> CALL_WITH_CATCH(fail,fail);
Error, CALL_WITH_CATCH(<func>, <args>): <func> must be a function
gap> CALL_WITH_CATCH(x->x,fail);
Error, CALL_WITH_CATCH(<func>, <args>): <args> must be a list
gap> CALL_WITH_CATCH(x->x,[1..3]);
Error, Function: number of arguments must be 1 (not 3)
[ false, 0 ]
gap> CALL_WITH_CATCH({x,y,z}->x,[1..3]);
[ true, 1 ]

#
gap> GAP_CRC(fail);
Error, <filename> must be a string (not a boolean or fail)
gap> GAP_CRC("foobar");
0

#
gap> LOAD_DYN(fail, fail);
Error, <filename> must be a string (not a boolean or fail)
gap> LOAD_DYN("foobar", fail);
Error, <crc> must be a small integer or 'false' (not a boolean or fail)

#
gap> LOAD_STAT(fail, fail);
Error, <filename> must be a string (not a boolean or fail)
gap> LOAD_STAT("foobar", fail);
Error, <crc> must be a small integer or 'false' (not a boolean or fail)
gap> LOAD_STAT("foobar", false);
false

#
gap> LoadedModules();;

#
gap> GASMAN();
Error, usage: GASMAN( "display"|"displayshort"|"clear"|"collect"|"message"|"pa\
rtial" )
gap> GASMAN(fail);
Error, GASMAN: <cmd> must be a string (not a boolean or fail)

#
gap> SIZE_OBJ(0);
0
gap> SIZE_OBJ(Z(2));
0

#
gap> OBJ_HANDLE(0);
gap> OBJ_HANDLE(HANDLE_OBJ("test"));
"test"

#
gap> MASTER_POINTER_NUMBER(0);
0
gap> MASTER_POINTER_NUMBER(Z(2));
0

#
gap> FUNC_BODY_SIZE(fail);
fail

#
gap> Sleep(fail);
Error, <secs> must be a small integer
gap> Sleep(0);
gap> Sleep(1);

#
gap>    MicroSleep(fail);
Error, <usecs> must be a small integer
gap> MicroSleep(0);
gap> MicroSleep(1);

#
gap> GAP_EXIT_CODE("invalid");
Error, GAP_EXIT_CODE: Argument must be boolean or integer
gap> GAP_EXIT_CODE(fail);
gap> GAP_EXIT_CODE(false);
gap> GAP_EXIT_CODE(true);

#
gap> QUIT_GAP("invald");
Error, usage: QUIT_GAP( [ <return value> ] )
gap> QUIT_GAP(1, 2);
Error, usage: QUIT_GAP( [ <return value> ] )

#
gap> FORCE_QUIT_GAP("invald");
Error, usage: FORCE_QUIT_GAP( [ <return value> ] )
gap> FORCE_QUIT_GAP(1, 2);
Error, usage: FORCE_QUIT_GAP( [ <return value> ] )

#
gap> BREAKPOINT(0);