[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tests: test -i/--inplace with backup suffix option
From: |
Jim Meyering |
Subject: |
Re: tests: test -i/--inplace with backup suffix option |
Date: |
Sat, 28 May 2016 17:34:23 -0700 |
Hi Assaf,
Thank you for all of those new tests.
When I run the test mentioned above, it fails on OS X (with tty from
gnu coreutils) like this:
+ compare_ exp-err-not-reg-file err-not-reg-file
+ diff -u exp-err-not-reg-file err-not-reg-file
+ cat
+ ttydev=
+ which tty
++ tty
+ ttydev='not a tty'
+ test 'not a tty'
+ returns_ 4 sed -i = 'not a tty'
+ fail=1
+ sed -i 's/edit.*:/edit X:/' err-tty
+ compare_ exp-err-tty err-tty
+ diff -u exp-err-tty err-tty
--- exp-err-tty 2016-05-28 17:24:58.000000000 -0700
+++ err-tty 2016-05-28 17:24:58.000000000 -0700
@@ -1 +1 @@
-sed: couldn't edit X: is a terminal
+sed: can't read not a tty: No such file or directory
I suggest you make this change to panic-tests.sh to avoid that:
- if test "$ttydev" ; then
+ if test -w "$ttydev" ; then
Probably also with a default ttydev=no-such-file value to ensure that
the test fails also when which tty fails.
- Re: tests: test -i/--inplace with backup suffix option,
Jim Meyering <=