Displaying 1 result from an estimated 1 matches for "test_which".
2019 Jan 11
3
[PATCH 1/3] mlstdutils: add a very simple test for Std_utils.which
..._X and Std_utils.X_of_int byte swapping
* functions.
@@ -140,6 +145,12 @@ let test_string_chomp ctx =
assert_equal_string "" (String.chomp "\n");
assert_equal_string "\n" (String.chomp "\n\n") (* only removes one *)
+(* Test Std_utils.which. *)
+let test_which ctx =
+ assert_nonempty_string (which "true");
+ assert_raises_executable_not_found "this-command-does-not-really-exist";
+ ()
+
(* Suites declaration. *)
let suite =
"mllib Std_utils" >:::
@@ -154,6 +165,7 @@ let suite =
"strings.lines_split&quo...