]> Sergey Matveev's repositories - zsh-autoenv.git/commitdiff
tests: fixes for noclobber (#62)
authorDaniel Hahler <github@thequod.de>
Sun, 23 Apr 2017 20:11:55 +0000 (22:11 +0200)
committerGitHub <noreply@github.com>
Sun, 23 Apr 2017 20:11:55 +0000 (22:11 +0200)
tests/upgrade_hash.t
tests/varstash.t

index 03c9ae12254fe37187c7249dcf8ce509f3781ed0..01640d7bbbb90026c5f3f451b80f374d2b69b22b 100644 (file)
@@ -10,7 +10,7 @@ Create a single v1 hash entry.
   $ echo 'echo ENTERED' > sub/$AUTOENV_FILE_ENTER
   $ echo 'echo LEAVE' > sub/$AUTOENV_FILE_LEAVE
 
-  $ echo :$PWD/sub/$AUTOENV_FILE_ENTER:4c403f1870af2ab5472370a42b6b2b488cefe83c:1 > $AUTOENV_AUTH_FILE
+  $ echo :$PWD/sub/$AUTOENV_FILE_ENTER:4c403f1870af2ab5472370a42b6b2b488cefe83c:1 >| $AUTOENV_AUTH_FILE
   $ cd sub
   ENTERED
 
@@ -23,8 +23,8 @@ de-authenticating the old hash.
 
 Re-create auth file with v1 hashes for both auth files.
 
-  $ echo :$PWD/$AUTOENV_FILE_LEAVE:882cf0333ea3c35537c9459c08d8987f25087ea9:1 > $AUTOENV_AUTH_FILE
-  $ echo :$PWD/$AUTOENV_FILE_ENTER:4c403f1870af2ab5472370a42b6b2b488cefe83c:1 >> $AUTOENV_AUTH_FILE
+  $ echo :$PWD/$AUTOENV_FILE_LEAVE:882cf0333ea3c35537c9459c08d8987f25087ea9:1 >| $AUTOENV_AUTH_FILE
+  $ echo :$PWD/$AUTOENV_FILE_ENTER:4c403f1870af2ab5472370a42b6b2b488cefe83c:1 >>| $AUTOENV_AUTH_FILE
 
 Only the leave file's hash should get updated.
 
index dd730c468ed3d348d7d6f72ddec1cdc09ab210ff..187904fc07d0830e0cae44e8ee83b2abcb7f9da7 100644 (file)
@@ -20,8 +20,8 @@ The varstash library should not get loaded always.
 
 Now on to some stashing.
 
-  $ echo 'echo ENTER; autostash FOO=changed' > $AUTOENV_FILE_ENTER
-  $ echo 'echo LEAVE; autounstash' > $AUTOENV_FILE_LEAVE
+  $ echo 'echo ENTER; autostash FOO=changed' >| $AUTOENV_FILE_ENTER
+  $ echo 'echo LEAVE; autounstash' >| $AUTOENV_FILE_LEAVE
   $ test_autoenv_auth_env_files
 
 Set environment variable.