-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: uniformly support gvar an rnams of <= 1023 chars
The manual says that identifiers are truncated to 1023 chars, i.e., an identifier has *at most* 1023 chars. But some of our code instead restricted them to *less* than 1023 chars, i.e., the maximum was 1022. We now do what the manual has been saying since forever.
- Loading branch information
Showing
5 changed files
with
134 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# | ||
# Tests for functions defined in src/scanner.c | ||
# | ||
gap> START_TEST("kernel/scanner.tst"); | ||
|
||
# | ||
# test long gvar names: at most 1023 chars are supported | ||
# | ||
gap> x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 := 1; | ||
1 | ||
gap> x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 := 1; | ||
1 | ||
gap> x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 := 1; | ||
Syntax error: Identifiers in GAP must consist of at most 1023 characters. in s\ | ||
tream:1 | ||
x11111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
1111111111 := 1; | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
^ | ||
|
||
# also test the case where the truncation to 1023 chars ia a number | ||
gap> 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111x := 1; | ||
1 | ||
gap> 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111x := 1; | ||
1 | ||
gap> 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111x := 1; | ||
Syntax error: Identifiers in GAP must consist of at most 1023 characters. in s\ | ||
tream:1 | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111x := 1; | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
^ | ||
|
||
# | ||
# test long record names: at most 1023 chars are supported | ||
# | ||
gap> a:=rec();; | ||
gap> a.x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 := 1; | ||
1 | ||
gap> a.x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 := 1; | ||
1 | ||
gap> a.x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 := 1; | ||
Syntax error: Identifiers in GAP must consist of at most 1023 characters. in s\ | ||
tream:1 | ||
a.x111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111111111111111111111111111111111111111111111111111111111111111111111\ | ||
111111111111 := 1; | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
\ | ||
^ | ||
|
||
# | ||
gap> STOP_TEST("kernel/scanner.tst", 1); |
Oops, something went wrong.