aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin/touch.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-25 18:40:03 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-12-05 17:21:48 +0300
commit4bad3a3aa3ffc111197f1d5d4b50baa1c4390444 (patch)
tree10eb60d71cf2006ea1718e38cd0f6c974238669d /tests/test/script/builtin/touch.test
parent2e4ba5a271cb5967feaf4686337e8f63d45acb1f (diff)
Add rm builtin
Diffstat (limited to 'tests/test/script/builtin/touch.test')
-rw-r--r--tests/test/script/builtin/touch.test14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/test/script/builtin/touch.test b/tests/test/script/builtin/touch.test
index ef950ea..0f9e4ef 100644
--- a/tests/test/script/builtin/touch.test
+++ b/tests/test/script/builtin/touch.test
@@ -20,8 +20,18 @@ rm a
cat <"" >>>a;
touch a
-# @@ How we can test that touch of an existing file doesn't register a cleanup?
-#
+: no-cleanup
+:
+: Test that touching an existing file doesn't register cleanup. If it does then
+: the file would be removed while leaving the embedded scope, and so the
+: cleanup registered by the first touch would fail.
+:
+{
+ +touch a
+ {
+ touch ../a
+ }
+}
: no-args
: