On Tue, Oct 06, 2015 at 01:30:50PM +0100, Richard W.M. Jones wrote:
-(* 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 "string_prefix,foo123,foo" (string_prefix "foo123"
"foo");
- assert_bool "not (string_prefix,,foo" (not (string_prefix ""
"foo"))
+(* Test Common_utils.String.is_prefix. *)
+let test_String.is_prefix ctx =
+ assert_bool "String.is_prefix,," (String.is_prefix ""
"");
+ assert_bool "String.is_prefix,foo," (String.is_prefix "foo"
"");
+ assert_bool "String.is_prefix,foo,foo" (String.is_prefix "foo"
"foo");
+ assert_bool "String.is_prefix,foo123,foo" (String.is_prefix
"foo123" "foo");
+ assert_bool "not (String.is_prefix,,foo" (not (String.is_prefix ""
"foo"))
Hmm, that's not right!
An overenthusiastic Perl script.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org