-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing a .tst
file as a command line argument to gap
will now invoke Test
on it
#4099
Conversation
... instead of Read / READ_NORECOVERY. This is purely a convenience feature: now one can for example run gap tst/testinstall/perm.tst which is equivalent to gap -c 'Test("tst/testinstall/perm.tst");' but shorter and easier to enter via shell command completion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool.
I do this at least once a month, so I like the change |
@@ -937,6 +937,9 @@ InstallAndCallPostRestore( function() | |||
f := GAPInfo.InitFiles[i]; | |||
if IsRecord(f) then | |||
status := READ_NORECOVERY(InputTextString(f.command)); | |||
elif EndsWith(f, ".tst") then | |||
Test(f); | |||
status := true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course one could try to make this more robust: e.g. first check if f
refers to an existing and readable file, and if not... dunno, what? Right now, one gets a break loop, which says "type 'quit;' to quit to outer loop" but if one does that, GAP actually quits (because the main REPL has not yet been started). Hmm
Amazing! |
.tst
file as argument to gap
will now invoke Test
on it, instead of trying to Read
it (which will fail).tst
file as a command line argument to gap
will now invoke Test
on it
... instead of Read / READ_NORECOVERY. This is purely a convenience
feature: now one can for example run
which is equivalent to
but shorter and easier to enter via shell command completion.