search for: string_lines_split

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

2015 Jan 23
2
[PATCH 1/2] mllib: tests: add tests for string_lines_split
...(* Test Common_utils.int_of_le32 and Common_utils.le32_of_int. *) let test_le32 () = @@ -110,6 +111,22 @@ let test_string_find () = assert_equal_int (-1) (string_find "" "baz"); assert_equal_int (-1) (string_find "foobar" "baz") +(* Test Common_utils.string_lines_split. *) +let test_string_lines_split () = + assert_equal_stringlist [""] (string_lines_split ""); + assert_equal_stringlist ["A"] (string_lines_split "A"); + assert_equal_stringlist ["A"; ""] (string_lines_split "A\n"); + assert_...
2015 May 11
3
[PATCH 1/2] mllib: Require OUnit2 for tests.
...;" ""); assert_equal_int 0 (string_find "foo" ""); assert_equal_int 1 (string_find "foo" "o"); @@ -112,7 +112,7 @@ let test_string_find () = assert_equal_int (-1) (string_find "foobar" "baz") (* Test Common_utils.string_lines_split. *) -let test_string_lines_split () = +let test_string_lines_split ctx = assert_equal_stringlist [""] (string_lines_split ""); assert_equal_stringlist ["A"] (string_lines_split "A"); assert_equal_stringlist ["A"; ""] (string_lines...
2015 Oct 07
1
Re: [PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
.... The old vs "new" functions are: > > string_prefix -> String.is_prefix > string_suffix -> String.is_suffix > string_find -> String.find > replace_str -> String.replace > string_nsplit -> String.nsplit > string_split -> String.split > string_lines_split -> String.lines_split > string_random8 -> String.random8 > --- As mentioned yesterday on IRC, I'm torn about this one: the functions would automatically alias functions with the same name, whenever available in OCaml' stdlib. Also (but this is more personal), reading String.fo...
2015 Jan 21
2
[PATCH] customize: add --commands-from-file
Pass to --commands-from-file the name of a file containing customization commands in each line, as if they were specified as command line arguments. This eases the reuse of commands among different builder/customize/sysprep invocations. --- builder/cmdline.ml | 3 +- customize/customize_run.ml | 5 +++ generator/customize.ml | 98 ++++++++++++++++++++++++++++++++++++++++++++-- 3
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...med and placed in the String.* namespace. The old vs "new" functions are: string_prefix -> String.is_prefix string_suffix -> String.is_suffix string_find -> String.find replace_str -> String.replace string_nsplit -> String.nsplit string_split -> String.split string_lines_split -> String.lines_split string_random8 -> String.random8 --- builder/checksums.ml | 2 +- builder/downloader.ml | 2 +- builder/index_parser.ml | 4 +- builder/paths.ml | 2 +- builder/sigchecker.ml...
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.