]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - tests/source_config.test
source_config() can load normal configuration files.
[config/dotfiles.git] / tests / source_config.test
index 7d062cf1beb89ee3ca550da3d95473d31e70e3aa..7237d11f2a74c626432415307bb221cf48be649d 100644 (file)
@@ -2,7 +2,7 @@
 
 
 # Load source_config().
-source ../shell/env
+. ../shell/env
 
 
 # Make sure the old temporary directory is removed.
@@ -14,6 +14,7 @@ mkdir tmp/shell
 mkdir tmp/zsh tmp/zsh/host tmp/zsh/os
 echo echo loaded bash/env.zucker > tmp/shell/env.zucker
 echo echo loaded shell/env.zucker > tmp/shell/env.zucker
+echo echo loaded shell/logout > tmp/shell/logout
 echo echo loaded zsh.env.local > tmp/zsh/env.local
 echo echo loaded zsh/rc.local > tmp/zsh/rc.local
 echo echo loaded zsh/host/rc.zucker > tmp/zsh/host/rc.zucker
@@ -22,17 +23,30 @@ echo echo loaded zsh/os/rc.Darwin > tmp/zsh/os/rc.Darwin
 
 function tests() {
     source_config tmp/zsh os   rc Darwin nolocal
+    echo -n $source_file$source_file_local
     source_config tmp/zsh host rc zucker
+    echo -n $source_file$source_file_local
 
     source_config tmp/zsh os   env Darwin nolocal
+    echo -n $source_file$source_file_local
     source_config tmp/zsh host env zucker
+    echo -n $source_file$source_file_local
 
     source_config tmp/bash host rc zucker
+    echo -n $source_file$source_file_local
 
     source_config tmp/shell "" env zucker
+    echo -n $source_file$source_file_local
+
+    source_config tmp/shell "" logout
+    echo -n $source_file$source_file_local
+    source_config tmp/shell "" doesnt-exist
+    echo -n $source_file$source_file_local
 }
 
 # Run tests without and with debug output.
 tests
 echo
 DEBUG=1 tests
+
+# vim: ft=sh