Skip to content

Commit

Permalink
simplify test output
Browse files Browse the repository at this point in the history
  • Loading branch information
rvantonder committed Nov 22, 2019
1 parent dd0c60b commit 759d991
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/alpha/test_cli.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1053,14 +1053,11 @@ let%expect_test "warn_on_match_template_starts_with_everything_hole" =
let match_template = ":[2] :[[1]]" in
let rewrite_template = ":[1]" in
let command_args =
Format.sprintf "-stdin -sequential '%s' '%s' -f .c " match_template rewrite_template
Format.sprintf "-stdin -sequential '%s' '%s' -stdout -f .c " match_template rewrite_template
in
let command = Format.sprintf "%s %s" binary_path command_args in
let result = read_expect_stdin_and_stdout command source in
print_string result;
[%expect{|
------ /dev/null
++++++ /dev/null
@|-1,1 +1,1 ============================================================
!|hello world
world
WARNING: The match template starts with a :[hole]. You almost never want to start a template with :[hole], since it matches everything including newlines up to the part that comes after it. This can make things slow. :[[hole]] might be what you're looking for instead, like when you want to match an assignment foo = bar(args) on a line, use :[[var]] = bar(args). :[hole] is typically useful inside balanced delimiters. |}]

0 comments on commit 759d991

Please sign in to comment.