Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expect tests include bad path information #3448

Open
yminsky opened this issue Jul 26, 2021 · 0 comments
Open

Expect tests include bad path information #3448

yminsky opened this issue Jul 26, 2021 · 0 comments

Comments

@yminsky
Copy link
Member

yminsky commented Jul 26, 2021

I"m not sure how to deal with this. Here's an example of a problematic section:

  $ dune runtest
       patdiff (internal) (exit 1)
  (cd _build/default && /home/yminsky/Documents/code/rwo/_build/install/default/bin/patdiff -keep-whitespace -location-style omake -ascii test.ml test.ml.corrected)
  ------ test.ml
  ++++++ test.ml.corrected
  File "test.ml", line 32, characters 0-1:
   |    "%4.2f: %s\n"
   |    offset
   |    (match result with
   |    | `Consumed -> "C"
   |    | `No_capacity -> "N")
   |
   |
   |[@@@part "2"];;
   |
   |let%expect_test _ =
   |  let lim = limiter () in
   |  let consume offset = consume lim offset in
   |  (* Exhaust the rate limit, without advancing the clock. *)
   |  for _ = 1 to 3 do
   |    consume 0.
   |  done;
  -|  [%expect {| |}];
  +|  [%expect {|
  +|    0.00: C
  +|    0.00: C
  +|    0.00: C |}];
   |  (* Wait until a half-second has elapsed, try again *)
   |  consume 0.5;
  -|  [%expect {| |}];
  +|  [%expect {| 0.50: C |}];
   |  (* Wait until a full second has elapsed, try again *)
   |  consume 1.;
  -|  [%expect {|  |}]
  +|  [%expect {| 1.00: C |}]
  [1]

Note the /home/yminsky/documents. Here's the PR that shows this behavior:

#3447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant