diff --git a/src/bin_client/test/test_contracts.sh b/src/bin_client/test/test_contracts.sh index 696f834f1..3b1a82789 100755 --- a/src/bin_client/test/test_contracts.sh +++ b/src/bin_client/test/test_contracts.sh @@ -581,6 +581,13 @@ bake_after $client transfer 1 from bootstrap1 to big_map_get_add -arg '(Pair (Pa bake_after $client transfer 1 from bootstrap1 to big_map_get_add -arg '(Pair (Pair 400 (Some 1232)) (Pair 400 (Some 1232)))' bake_after $client transfer 1 from bootstrap1 to big_map_get_add -arg '(Pair (Pair 401 (Some 0)) (Pair 400 (Some 1232)))' +# Test for issue #262 +tee /tmp/bug_262.tz < Seq (0, args)) in let annots_encoding = let split s = - let annots = String.split_on_char ' ' s in - List.iter (fun a -> - if String.length a > 255 then failwith "Oversized annotation" - ) annots; - if String.concat " " annots <> s then - failwith "Invalid annotation string, \ - must be a sequence of valid annotations with spaces" ; - annots in + if s = "" then [] + else + let annots = String.split_on_char ' ' s in + List.iter (fun a -> + if String.length a > 255 then failwith "Oversized annotation" + ) annots; + if String.concat " " annots <> s then + failwith "Invalid annotation string, \ + must be a sequence of valid annotations with spaces" ; + annots in splitted ~json:(list (Bounded.string 255)) ~binary:(conv (String.concat " ") split string) in