diff --git a/.github/workflows/js_of_ocaml.yml b/.github/workflows/js_of_ocaml.yml index ce3b29c07b..b89249ff75 100644 --- a/.github/workflows/js_of_ocaml.yml +++ b/.github/workflows/js_of_ocaml.yml @@ -108,13 +108,6 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt-get update - - name: Set git to use LF - if: ${{ matrix.os == 'windows-latest' && matrix.ocaml-compiler < 5.2 }} - run: | - git config --global core.autocrlf false - git config --global core.eol lf - git config --global core.ignorecase false - - name: Checkout tree uses: actions/checkout@v4 @@ -156,6 +149,9 @@ jobs: # It's faster to use a cached version run: opam install --fake binaryen-bin + - run: opam pin add ppx_expect https://github.com/hhugo/ppx_expect.git#v16-win + if: contains( matrix.ocaml-compiler, '4.14') + - run: opam install . --best-effort --solver builtin-mccs+glpk if: ${{ matrix.skip-test }} diff --git a/.github/workflows/wasm_of_ocaml.yml b/.github/workflows/wasm_of_ocaml.yml index 96e4bb010c..955346312e 100644 --- a/.github/workflows/wasm_of_ocaml.yml +++ b/.github/workflows/wasm_of_ocaml.yml @@ -66,13 +66,6 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt-get update - - name: Set git to use LF - if: ${{ matrix.os == 'windows-latest' && matrix.ocaml-compiler < 5.2 }} - run: | - git config --global core.autocrlf false - git config --global core.eol lf - git config --global core.ignorecase false - - name: Checkout tree uses: actions/checkout@v4 with: diff --git a/compiler/tests-check-prim/gen_dune.ml b/compiler/tests-check-prim/gen_dune.ml index e6cd42c2e4..82d8707956 100644 --- a/compiler/tests-check-prim/gen_dune.ml +++ b/compiler/tests-check-prim/gen_dune.ml @@ -86,6 +86,7 @@ let rule bc ocaml_version os_type = let () = let versions : version list = [ `V4_14; `V5_2; `V5_3; `V5_4 ] in + set_binary_mode_out stdout true; List.iter (fun ocaml_version -> List.iter diff --git a/compiler/tests-compiler/js_parser_printer.ml b/compiler/tests-compiler/js_parser_printer.ml index 4fd903a984..042c0ca90b 100644 --- a/compiler/tests-compiler/js_parser_printer.ml +++ b/compiler/tests-compiler/js_parser_printer.ml @@ -727,7 +727,7 @@ let check_vs_string s toks = then () else match s.[a] with - | ' ' | '\n' | '\t' -> space (succ a) b + | ' ' | '\n' | '\t' | '\r' -> space (succ a) b | c -> Printf.printf "pos:%d, expecting space until %d, found %C\n" a b c in let text pos str = @@ -873,12 +873,13 @@ let%expect_test "string" = 5: 4:var, 8:a, 10:=, 12:"munpi\207\128\207\128\207\128qtex", 26:;, |}] let%expect_test "multiline string" = - parse_print_token ~invalid:true {| + let clean s = Str.global_replace (Str.regexp "\r\n") "\n" s in + parse_print_token ~invalid:true (clean {| 42; " "; 42 -|}; +|}); [%expect {| 2: 4:42, 6:;, @@ -886,24 +887,24 @@ let%expect_test "multiline string" = 4: 5:;, 5: 4:42, 0:;, Lexer error: fake:3:5: Unexpected token ILLEGAL |}]; - parse_print_token {| + parse_print_token (clean {| 42; "\ "; 42 -|}; +|}); [%expect {| 2: 4:42, 6:;, 3: 4:" ", 4: 5:;, 5: 4:42, 0:;, |}]; - parse_print_token ~invalid:true {| + parse_print_token ~invalid:true (clean {| 42; " "; 42 -|}; +|}); [%expect {| 2: 4:42, 6:;,