Commits

Anonymous committed 0a04166

no printfs in test_http_service (to ease gc profiling)

  • Participants
  • Parent commits 7ca2ca3

Comments (0)

Files changed (1)

tests/test_http_service.ml

   I.lift (Lwt_unix.sleep 0.5) >>= fun () ->
   let _files = open_file () in
 *)
-  let txt = sprintf "path: [%s]\nparams string: %s\nparams parsed: %s\n"
-    (String.concat " ; " &
-     List.map (sprintf "%S") &
-     segpath
-    )
-    (match rq.rq_uri.Uri_type.query with
-     [ None -> "None"
-     | Some str -> sprintf "Some %s" str
-     ]
-    )
-    (match rq.rq_uri.Uri_type.query with
-     [ None -> "None"
-     | Some str ->
-         let parsed = Uri.parse_params str in
-         sprintf "Some [%s]"
-           (String.concat " ; "
-              (List.map
-                 (fun (k, v) ->
-                    sprintf "%s = %s" k v
-                 )
-                 parsed
-              )
-           )
-     ]
-    )
+  let txt =
+      "path: ["
+    ^ (String.concat " ; " & List.map String.escaped segpath)
+    ^ "]\nparams string: "
+    ^ (match rq.rq_uri.Uri_type.query with
+       [ None -> "None"
+       | Some str -> "Some " ^ str
+       ]
+      )
+    ^ "\nparams parsed: "
+    ^ (match rq.rq_uri.Uri_type.query with
+       [ None -> "None"
+       | Some str ->
+           let parsed = Uri.parse_params str in
+             "Some ["
+           ^ (String.concat " ; "
+                (List.map
+                   (fun (k, v) ->
+                      k ^ " = " ^ v
+                   )
+                   parsed
+                )
+             )
+           ^ "]"
+       ]
+      )
+    ^ "\n"
     (* _files *)
   in
   (* let () =