Verify that we don't raise an exceptions when it's not necessary (listing without $EDITOR for example shouldn't raise anything) Closes #3.
@@ -58,8 +58,8 @@ let home =
;;
(* Get default editor *)
-let editor = (* If editor is not set, it gets "" *)
+let editor = (* If editor is not set, it gets "", but an exeption is trowed *)
- lazy (get_var "EDITOR")
+ lazy (get_var ~exp:true "EDITOR")
(* Level of verbosity, used by Messages module *)
@@ -43,5 +43,11 @@ binary=../oclaunch.native
# Should throw one error, about $HOME
env -i $binary
+# An exception with $EDITOR
+env -u EDITOR $binary -m 0
+
# Should throw no blocking error (2)
env -u EDITOR $binary
+# No exception
+env -u EDITOR $binary -l