summaryrefslogtreecommitdiff
path: root/tests/syntax.at
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2017-03-18 21:41:53 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2017-03-18 21:41:53 +0000
commit6895abeab878a30d05c122c2467990ebb47bd58a (patch)
treec83c107f25929f537445d21738c490d53c59b94d /tests/syntax.at
parent0bc8d6575fcb65f394796e060efa34444d983b7b (diff)
Notes
Diffstat (limited to 'tests/syntax.at')
-rw-r--r--tests/syntax.at31
1 files changed, 29 insertions, 2 deletions
diff --git a/tests/syntax.at b/tests/syntax.at
index 2a2abd05b8985..35134d1bd11ee 100644
--- a/tests/syntax.at
+++ b/tests/syntax.at
@@ -28,8 +28,9 @@ AT_CHECK([[tcsh -f -c '(sleep 1; echo async) & echo sync; wait' \
[[[1] @&t@
sync
async
-[1] Done ( sleep 1; echo async )
-]])
+]],
+[[[1] Done ( sleep 1; echo async )]]
+)
AT_CLEANUP
@@ -160,4 +161,30 @@ AT_CHECK([tcsh -f -c '(echo $this_does_not_exist) |& cat'], 1,
[this_does_not_exist: Undefined variable.
])
+dnl noclobber=notempty
+echo Hello > output
+AT_CHECK([tcsh -f -c 'set noclobber=notempty; echo OK >& output'], 1, [],
+[output: File exists.
+])
+
+rm -f output
+touch output
+AT_CHECK([tcsh -f -c 'set noclobber=notempty; echo OK >& output'])
+AT_CHECK([cat output], ,
+[OK
+])
+
+dnl noclobber=ask
+dnl touch output
+dnl AT_CHECK([tcsh -f -c 'set noclobber=ask; echo "n" | echo OK >& output'], 0, [],
+dnl [output: File exists.
+dnl ])
+dnl T_CHECK([tcsh -f -c 'set noclobber=ask; echo "y" | echo OK >& output'])
+
+dnl noclobber=(notempty ask)
+dnl rm -f output
+dnl touch output
+dnl AT_CHECK([tcsh -f -c 'set noclobber=(notempty ask); echo OK >& output'])
+
+
AT_CLEANUP