From 33a76e1f8e386e2bfce1613cc164908f0939bc27 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Thu, 2 Oct 2014 16:32:16 -0700 Subject: Update psub for the new --inherit-variable flag Also do some minor formatting cleanup, make psub return 1 when executed outside of a command substitution, and make it respect $TMPDIR. --- tests/test9.in | 8 ++++++++ tests/test9.out | 1 + 2 files changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/test9.in b/tests/test9.in index e40bc74e..95a75843 100644 --- a/tests/test9.in +++ b/tests/test9.in @@ -1,3 +1,4 @@ +# vim: set filetype=fish: # ensure that builtins that produce no output can still truncate files # (bug PCA almost reintroduced!) echo "Testing that builtins can truncate files" @@ -89,4 +90,11 @@ cat (echo foo | psub) cat (echo bar | psub) cat (echo baz | psub) +set -l filename (echo foo | psub) +if test -e $filename + echo 'psub file was not deleted' +else + echo 'psub file was deleted' +end + false diff --git a/tests/test9.out b/tests/test9.out index 7580b1d8..2e8e8bc7 100644 --- a/tests/test9.out +++ b/tests/test9.out @@ -16,3 +16,4 @@ Testing for loop foo bar baz +psub file was deleted -- cgit v1.2.3