diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 2006-10-27 09:12:32 +0000 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 2006-10-27 09:12:32 +0000 |
commit | 17e1ddf8f7b6d55bbdda52480fa8493789e3e5a0 (patch) | |
tree | 45ecfc0e3fa274961419988e5905c99aebfe4e4b | |
parent | dd25537b69b51f106e552e52b82847351c40e34d (diff) |
Format_from_string specification changed.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7707 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | test/Moretest/tscanf.ml | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/Moretest/tscanf.ml b/test/Moretest/tscanf.ml index 4740753eb..9aca93902 100644 --- a/test/Moretest/tscanf.ml +++ b/test/Moretest/tscanf.ml @@ -789,7 +789,7 @@ let test45 () = test (test45 ());; -(* Testing printing meta formats. *) +(* Testing printing of meta formats. *) let test46, test47 = (fun () -> @@ -802,15 +802,15 @@ let test46, test47 = test (test46 () = "1 spells one, in english.");; test (test47 () = "1 ,%s, in english.");; -(* Testing scanning meta formats. *) +(* Testing scanning of meta formats. *) let test48 () = (* Testing format_from_string. *) let test_meta_read s fmt efmt = format_from_string s fmt = efmt in (* Test if format %i is indeed read as %i. *) - let s, fmt = "\"%i\"", format_of_string "%i" in + let s, fmt = "%i", format_of_string "%i" in test_meta_read s fmt fmt && (* Test if format %i is compatible with %d and indeed read as %i. *) - let s, fmt = "\"%i\"", format_of_string "%d" in + let s, fmt = "%i", format_of_string "%d" in test_meta_read s fmt "%i" && (* Complex test of scanning a meta format specified in the scanner input format string and extraction of its specification from a string. *) @@ -847,11 +847,9 @@ let next_char ob () = let c = s.[0] in Buffer.clear ob; Buffer.add_string ob (String.sub s 1 (len - 1)); - (*prerr_endline (Printf.sprintf "giving %C" c);*) c;; let send_string ob s = - (*prerr_endline (Printf.sprintf "adding %s\n" s);*) Buffer.add_string ob s; Buffer.add_char ob '\n';; let send_int ob i = send_string ob (string_of_int i);; |