]> Sergey Matveev's repositories - zsh-autoenv.git/blobdiff - tests/autoenv.t
tests: add and use test_autoenv_add_to_env and test_autoenv_auth_env_files
[zsh-autoenv.git] / tests / autoenv.t
index 47509129e259bf31fd504573da2a28a02ef6277d..f477c1377ef9e0dd1b1068f1a06253c4012a1557 100644 (file)
@@ -6,7 +6,7 @@ Lets set a simple .env action
 
 Manually create auth file
 
-  $ echo "$PWD/.env:$(echo echo ENTERED | shasum)" > $AUTOENV_ENV_FILENAME
+  $ test_autoenv_add_to_env $PWD/.env
   $ cd .
   ENTERED
 
@@ -41,7 +41,7 @@ Now lets see that it actually checks the shasum value
 
   $ unset _dotenv_stack_entered
   $ rm $AUTOENV_ENV_FILENAME
-  $ echo "$PWD/.env:$(echo mischief | shasum)" > $AUTOENV_ENV_FILENAME
+  $ test_autoenv_add_to_env $PWD/.env mischief
   $ cd .
   Attempting to load unauthorized env file: /tmp/cramtests-??????/autoenv.t/.env (glob)