-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/testscript: do not create an extra temporary directory
It's bugged me for a long time that the error messages printed by the `testscript` command do not refer to the actual files passed to the command, but instead to a temporary file created for the purposes of the command. This change alters the testscript command so that it avoids creating an extra copy of the script file, instead using the new ability of the testscript package to interpret explicitly provided files instead. Gratifyingly, this also simplifies the logic quite a bit. Note: this is dependent on #258, so should not be reviewed until that lands.
- Loading branch information
Showing
5 changed files
with
103 additions
and
192 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Check that all scripts are executed even when one fails. | ||
|
||
! testscript a.txt b.txt | ||
cmp stdout want-stdout | ||
-- want-stdout -- | ||
> exec false | ||
[exit status 1] | ||
FAIL: a.txt:1: unexpected command failure | ||
> exec false | ||
[exit status 1] | ||
FAIL: b.txt:2: unexpected command failure | ||
-- a.txt -- | ||
exec false | ||
-- b.txt -- | ||
|
||
exec false |
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
Oops, something went wrong.