diff options
author | Rob Landley <rob@landley.net> | 2016-01-31 15:30:48 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-01-31 15:30:48 -0600 |
commit | e5e286bf3cd8544ab161c508cbc810a104a7b186 (patch) | |
tree | ff41c8cbf63dde9f09f3ff0e3e9c201871f284dc /tests | |
parent | acf34f524d28fc51ac06dae6a1a6948d3e26bb68 (diff) | |
download | toybox-e5e286bf3cd8544ab161c508cbc810a104a7b186.tar.gz |
Fix broken test in cat.test.
"cat /proc/self/exe && cmp /proc/self/exe" won't see the same file if cat
and cmp aren't both in a toybox multiplexer binary, so snapshot and pick one.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/cat.test | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/cat.test b/tests/cat.test index 3d5842ae..7be515dd 100755 --- a/tests/cat.test +++ b/tests/cat.test @@ -16,8 +16,9 @@ testing "cat file1 notfound file2" \ "cat file1 notfound file2 2>stderr && echo ok ; cat stderr; rm stderr" \ "one\ntwo\ncat: notfound: No such file or directory\n" "" "" +FILE="$(readlink -f /proc/self/exe)" testing "cat file1" \ - "cat /proc/self/exe > file1 && cmp /proc/self/exe file1 && echo yes" \ + 'cat "$FILE" > file1 && cmp "$FILE" file1 && echo yes' \ "yes\n" "" "" testing "cat - file1" \ @@ -28,4 +29,4 @@ testing "cat > /dev/full" \ "cat - > /dev/full 2>stderr && echo ok; cat stderr; rm stderr" \ "cat: xwrite: No space left on device\n" "" "zero\n" -rm file1 file2
\ No newline at end of file +rm file1 file2 |