-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testscript: add test to show cmp with small diff between large files
Also define $ as part of the standard testscript environment, for use in cmpenv situations where the literal $ is required in a file.
- Loading branch information
Showing
2 changed files
with
168 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
# Verify the behaviour of cmp in the case of a small diff between | ||
# two large files | ||
|
||
unquote dir/script.txt | ||
! testscript dir | ||
env | ||
cmpenv stdout stdout.golden | ||
|
||
-- dir/script.txt -- | ||
>cmp a b | ||
> | ||
>-- a -- | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>-- b -- | ||
>b | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
>a | ||
-- stdout.golden -- | ||
|
||
> cmp a b | ||
[diff -a +b] | ||
-a | ||
+b | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
a | ||
|
||
FAIL: $$WORK${/}dir${/}script.txt:1: a and b differ |
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