File: normal_strings.ml

package info (click to toggle)
ppx-expect 0.17.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: ml: 3,399; ansic: 104; javascript: 19; makefile: 15; sh: 2
file content (34 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
let%expect_test "short quoted string" =
  print_string "foo\nbar\n";
  [%expect ""]
;;

let%expect_test "long quoted string" =
  print_string
    {|
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX
    |};
  [%expect ""]
;;

let%expect_test "quoted strings with leading spaces" =
  print_string {|
    live
      long
        and
    prosper
    |};
  [%expect ""];
  print_string
    {|
    live
      loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong
        and
    prosper
    |};
  [%expect ""]
;;