search for: test_string_prefix

Displaying 6 results from an estimated 6 matches for "test_string_prefix".

2015 May 11
3
[PATCH 1/2] mllib: Require OUnit2 for tests.
...an_size 100_L); assert_equal_string "-100" (human_size (-100_L)); assert_equal_string "1.0K" (human_size 1024_L); @@ -87,7 +87,7 @@ let test_human_size () = assert_equal_string "-3.4G" (human_size (-3650722201_L)) (* Test Common_utils.string_prefix. *) -let test_string_prefix () = +let test_string_prefix ctx = assert_bool "string_prefix,," (string_prefix "" ""); assert_bool "string_prefix,foo," (string_prefix "foo" ""); assert_bool "string_prefix,foo,foo" (string_prefix "foo" "...
2015 Jan 22
3
[PATCH 1/2] configure: look for the oUnit OCaml module
It will be used for the OCaml unit tests. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index e0fb481..e360bbb 100644 --- a/configure.ac +++ b/configure.ac @@ -1120,6 +1120,7 @@ AS_IF([test "x$OCAMLC" != "xno"],[ ]) OCAML_PKG_gettext=no +OCAML_PKG_oUnit=no AS_IF([test "x$OCAMLC" != "xno"],[ #
2015 Jan 22
0
[PATCH 2/2] mllib: convert common_utils_tests to oUnit
...string "1.3M" (human_size 1363149_L); + assert_equal_string "-1.3M" (human_size (-1363149_L)); + assert_equal_string "3.4G" (human_size 3650722201_L); + assert_equal_string "-3.4G" (human_size (-3650722201_L)) + +(* Test Common_utils.string_prefix. *) +let test_string_prefix () = + assert_bool "string_prefix,," (string_prefix "" ""); + assert_bool "string_prefix,foo," (string_prefix "foo" ""); + assert_bool "string_prefix,foo,foo" (string_prefix "foo" "foo"); + assert_bool &qu...
2015 Jan 23
2
[PATCH 1/2] mllib: tests: add tests for string_lines_split
...tringlist ["A\nB"; ""] (string_lines_split "A\\\nB\n"); + assert_equal_stringlist ["A\nB\n"] (string_lines_split "A\\\nB\\\n") + (* Suites declaration. *) let suite = TestList ([ @@ -124,6 +141,7 @@ let suite = "prefix" >:: test_string_prefix; "suffix" >:: test_string_suffix; "find" >:: test_string_find; + "string_lines_split" >:: test_string_lines_split; ]; ]) -- 1.9.3
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase. These are replaced by safe functions that won't break UTF-8 strings. Other miscellaneous refactoring. Rich.
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...4 --- a/mllib/common_utils_tests.ml +++ b/mllib/common_utils_tests.ml @@ -84,21 +84,21 @@ let test_human_size ctx = assert_equal_string "3.4G" (human_size 3650722201_L); assert_equal_string "-3.4G" (human_size (-3650722201_L)) -(* Test Common_utils.string_prefix. *) -let test_string_prefix ctx = - assert_bool "string_prefix,," (string_prefix "" ""); - assert_bool "string_prefix,foo," (string_prefix "foo" ""); - assert_bool "string_prefix,foo,foo" (string_prefix "foo" "foo"); - assert_bool &q...