Skip to content
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

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

fingolfin
Copy link
Member

... 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.

... 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.
@fingolfin fingolfin added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Aug 11, 2020
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0004%) to 85.751% when pulling 859d8e8 on fingolfin:mh/cli-tst-arg into 3c9e451 on gap-system:master.

Copy link
Member

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool.

@ChrisJefferson
Copy link
Contributor

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;
Copy link
Member Author

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

@fingolfin fingolfin merged commit 32ea105 into gap-system:master Sep 3, 2020
@fingolfin fingolfin deleted the mh/cli-tst-arg branch September 3, 2020 14:34
@olexandr-konovalov
Copy link
Member

Amazing!

@PaulaHaehndel PaulaHaehndel self-assigned this Feb 16, 2021
@PaulaHaehndel PaulaHaehndel added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Feb 16, 2021
@PaulaHaehndel PaulaHaehndel removed their assignment Feb 17, 2021
@fingolfin fingolfin changed the title Passing a .tst file as argument to gap will now invoke Test on it, instead of trying to Read it (which will fail) Passing a .tst file as a command line argument to gap will now invoke Test on it Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: added PRs introducing changes that have since been mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants