tests/_autoenv_utils.t | 24 ++++++++++++------------ tests/autoenv.t | 8 ++++---- tests/leave.t | 6 +++--- tests/recurse-upwards.t | 4 ++-- tests/setup.zsh | 5 ----- tests/upgrade_hash.t | 10 +++++----- diff --git a/tests/_autoenv_utils.t b/tests/_autoenv_utils.t index c77779f969a6cf108b20ac4988323b424a181199..cd8b9ad5f9cda835540c197b4385133cdb8e0ab0 100644 --- a/tests/_autoenv_utils.t +++ b/tests/_autoenv_utils.t @@ -46,41 +46,41 @@ $ echo first > first $ _autoenv_authorize first $ cat $AUTOENV_AUTH_FILE - :/tmp/cramtests-*/_autoenv_utils.t/first:2715464726.6:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/first:2715464726.6:2 (glob) And a second one. $ echo second > second $ _autoenv_authorize second $ cat $AUTOENV_AUTH_FILE - :/tmp/cramtests-*/_autoenv_utils.t/first:2715464726.6:2 (glob) - :/tmp/cramtests-*/_autoenv_utils.t/second:594940475.7:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/first:2715464726.6:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/second:594940475.7:2 (glob) And a third. $ echo third > third $ _autoenv_authorize third $ cat $AUTOENV_AUTH_FILE - :/tmp/cramtests-*/_autoenv_utils.t/first:2715464726.6:2 (glob) - :/tmp/cramtests-*/_autoenv_utils.t/second:594940475.7:2 (glob) - :/tmp/cramtests-*/_autoenv_utils.t/third:451243482.6:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/first:2715464726.6:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/second:594940475.7:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/third:451243482.6:2 (glob) Re-add the second one, with the same hash. $ _autoenv_authorize second $ cat $AUTOENV_AUTH_FILE - :/tmp/cramtests-*/_autoenv_utils.t/first:2715464726.6:2 (glob) - :/tmp/cramtests-*/_autoenv_utils.t/third:451243482.6:2 (glob) - :/tmp/cramtests-*/_autoenv_utils.t/second:594940475.7:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/first:2715464726.6:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/third:451243482.6:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/second:594940475.7:2 (glob) Re-add the first one, with a new hash. $ echo one more line >> first $ _autoenv_authorize first $ cat $AUTOENV_AUTH_FILE - :/tmp/cramtests-*/_autoenv_utils.t/third:451243482.6:2 (glob) - :/tmp/cramtests-*/_autoenv_utils.t/second:594940475.7:2 (glob) - :/tmp/cramtests-*/_autoenv_utils.t/first:3620404822.20:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/third:451243482.6:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/second:594940475.7:2 (glob) + :/*/cramtests-*/_autoenv_utils.t/first:3620404822.20:2 (glob) }}} diff --git a/tests/autoenv.t b/tests/autoenv.t index aeeeea4963d22ea3c62e4e17d54fc0f55fb035bc..8d2e864c5bff970bb7bb180b9f09919a5a7ad957 100644 --- a/tests/autoenv.t +++ b/tests/autoenv.t @@ -17,7 +17,7 @@ $ rm $AUTOENV_AUTH_FILE $ _autoenv_ask_for_yes() { echo "yes" } $ cd . Attempting to load unauthorized env file! - -* /tmp/cramtests-*/autoenv.t/.autoenv.zsh (glob) + -* /*/cramtests-*/autoenv.t/.autoenv.zsh (glob) ********************************************** @@ -42,7 +42,7 @@ $ rm $AUTOENV_AUTH_FILE $ test_autoenv_add_to_env $PWD/.autoenv.zsh mischief $ cd . Attempting to load unauthorized env file! - -* /tmp/cramtests-*/autoenv.t/.autoenv.zsh (glob) + -* /*/cramtests-*/autoenv.t/.autoenv.zsh (glob) ********************************************** @@ -61,7 +61,7 @@ $ rm $AUTOENV_AUTH_FILE $ _autoenv_ask_for_yes() { echo "no"; return 1 } $ cd . Attempting to load unauthorized env file! - -* /tmp/cramtests-*/autoenv.t/.autoenv.zsh (glob) + -* /*/cramtests-*/autoenv.t/.autoenv.zsh (glob) ********************************************** @@ -77,7 +77,7 @@ $ _autoenv_ask_for_yes() { echo "yes"; return 0 } $ cd . Attempting to load unauthorized env file! - -* /tmp/cramtests-*/autoenv.t/.autoenv.zsh (glob) + -* /*/cramtests-*/autoenv.t/.autoenv.zsh (glob) ********************************************** diff --git a/tests/leave.t b/tests/leave.t index 46580b76469b5f58563d212f446c771af95514cf..9cad5d03b329022c2aaaaa1b4b0ed1fe5ee12d2a 100644 --- a/tests/leave.t +++ b/tests/leave.t @@ -12,7 +12,7 @@ $ _autoenv_ask_for_yes() { echo "yes"; return 0 } $ cd . Attempting to load unauthorized env file! - -* /tmp/cramtests-*/leave.t/sub/.autoenv.zsh (glob) + -* /*/cramtests-*/leave.t/sub/.autoenv.zsh (glob) ********************************************** @@ -29,7 +29,7 @@ $ _autoenv_ask_for_yes() { echo "no"; return 1 } $ cd .. Attempting to load unauthorized env file! - -* /tmp/cramtests-*/leave.t/sub/.autoenv_leave.zsh (glob) + -* /*/cramtests-*/leave.t/sub/.autoenv_leave.zsh (glob) ********************************************** @@ -45,7 +45,7 @@ ENTERED $ _autoenv_ask_for_yes() { echo "yes"; return 0 } $ cd .. Attempting to load unauthorized env file! - -* /tmp/cramtests-*/leave.t/sub/.autoenv_leave.zsh (glob) + -* /*/cramtests-*/leave.t/sub/.autoenv_leave.zsh (glob) ********************************************** diff --git a/tests/recurse-upwards.t b/tests/recurse-upwards.t index c19e6b851d4b1e10c52a9dc1541ef68d45841838..a80353065c416a21062223edef0ea86e1e907870 100644 --- a/tests/recurse-upwards.t +++ b/tests/recurse-upwards.t @@ -115,7 +115,7 @@ $ _autoenv_ask_for_yes() { echo "no"; return 1 } $ cd sub autoenv_source_parent_from_sub: Attempting to load unauthorized env file! - -* /tmp/cramtests-*/recurse-upwards.t/.autoenv.zsh (glob) + -* /*/cramtests-*/recurse-upwards.t/.autoenv.zsh (glob) ********************************************** @@ -140,7 +140,7 @@ $ touch -t 201401010104 .autoenv.zsh $ cd . autoenv_source_parent_from_sub: Attempting to load unauthorized env file! - -* /tmp/cramtests-*/recurse-upwards.t/.autoenv.zsh (glob) + -* /*/cramtests-*/recurse-upwards.t/.autoenv.zsh (glob) ********************************************** diff --git a/tests/setup.zsh b/tests/setup.zsh index 31aee201214e80dd66c3cf9bd23ffa34f405c6d6..d1e26ed51e81c627171d3bd47bc4f5ef5546ee01 100644 --- a/tests/setup.zsh +++ b/tests/setup.zsh @@ -11,11 +11,6 @@ # setopt nounset export AUTOENV_AUTH_FILE="$CRAMTMP/autoenv/.autoenv_auth" -if [[ $AUTOENV_AUTH_FILE[0,4] != '/tmp' ]]; then - echo "AUTOENV_AUTH_FILE is not in /tmp. Aborting." - return 1 -fi - # Abort this setup script on any error. _save_errexit=${options[errexit]} set -e diff --git a/tests/upgrade_hash.t b/tests/upgrade_hash.t index 01640d7bbbb90026c5f3f451b80f374d2b69b22b..bf9df476bd7215667b019db5f8830b168cd626c0 100644 --- a/tests/upgrade_hash.t +++ b/tests/upgrade_hash.t @@ -19,7 +19,7 @@ This also tests that there are no empty lines being added to the auth file when de-authenticating the old hash. $ cat $AUTOENV_AUTH_FILE - :/tmp/cramtests-*/upgrade_hash.t/sub/.autoenv.zsh:3679467995.13:2 (glob) + :/*/cramtests-*/upgrade_hash.t/sub/.autoenv.zsh:3679467995.13:2 (glob) Re-create auth file with v1 hashes for both auth files. @@ -31,13 +31,13 @@ $ cd .. LEAVE $ cat $AUTOENV_AUTH_FILE - :/tmp/cramtests-*/upgrade_hash.t/sub/.autoenv.zsh:4c403f1870af2ab5472370a42b6b2b488cefe83c:1 (glob) - :/tmp/cramtests-*/upgrade_hash.t/sub/.autoenv_leave.zsh:803077150.11:2 (glob) + :/*/cramtests-*/upgrade_hash.t/sub/.autoenv.zsh:4c403f1870af2ab5472370a42b6b2b488cefe83c:1 (glob) + :/*/cramtests-*/upgrade_hash.t/sub/.autoenv_leave.zsh:803077150.11:2 (glob) The enter file's hash should get updated. $ cd sub ENTERED $ cat $AUTOENV_AUTH_FILE - :/tmp/cramtests-*/upgrade_hash.t/sub/.autoenv_leave.zsh:803077150.11:2 (glob) - :/tmp/cramtests-*/upgrade_hash.t/sub/.autoenv.zsh:3679467995.13:2 (glob) + :/*/cramtests-*/upgrade_hash.t/sub/.autoenv_leave.zsh:803077150.11:2 (glob) + :/*/cramtests-*/upgrade_hash.t/sub/.autoenv.zsh:3679467995.13:2 (glob)