Displaying 4 results from an estimated 4 matches for "test_string_chomp".
2019 Jan 11
3
[PATCH 1/3] mlstdutils: add a very simple test for Std_utils.which
...ert_failure (sprintf "Expected empty string, got '%s'" str)
+let assert_raises_executable_not_found exe =
+ assert_raises (Executable_not_found exe) (fun () -> which exe)
(* Test Std_utils.int_of_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_...
2017 Jul 21
3
[PATCH] common/mlstdutils: Add chomp function to remove \n from end of strings.
...n/mlstdutils/std_utils_tests.ml
+++ b/common/mlstdutils/std_utils_tests.ml
@@ -110,6 +110,15 @@ let test_string_span ctx =
assert_equal_int 3 (String.cspan "def" "ab");
assert_equal_int 0 (String.cspan "" "ab")
+(* Test Std_utils.String.chomp. *)
+let test_string_chomp ctx =
+ assert_equal_string "a" (String.chomp "a");
+ assert_equal_string "a" (String.chomp "a\n");
+ assert_equal_string "a\nb" (String.chomp "a\nb");
+ assert_equal_string "" (String.chomp "");
+ assert_equal_str...
2017 Sep 22
27
[PATCH v3 00/22] Replace almost all uses of the Str module with PCRE.
v1:
https://www.redhat.com/archives/libguestfs/2017-September/msg00135.html
v2:
https://www.redhat.com/archives/libguestfs/2017-September/msg00158.html
v3 is almost identical to v2, but I have added 4 extra commits to
almost finish the job of replacing Str everywhere possible (note it's
not possible to replace Str in common/mlstdutils or the generator
because those are pure OCaml).
As
2018 Apr 25
9
[PATCH v2 0/9] v2v: -i ova: Handle OVAs containing snapshots.
https://bugzilla.redhat.com/show_bug.cgi?id=1570407
This turned into quite an in-depth refactoring of how we handle OVAs.
It also fixes a potential security issue.
Rich.