From 4bad3a3aa3ffc111197f1d5d4b50baa1c4390444 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 25 Nov 2016 18:40:03 +0300 Subject: Add rm builtin --- tests/test/script/builtin/touch.test | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tests/test/script/builtin/touch.test') 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 : -- cgit v1.1