Skip to content

Commit 4508612

Browse files
committed
more specific ansi escape assertion for add/remove empty, too
1 parent 5133fe8 commit 4508612

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hacking-and-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ git submodule update --init
2525

2626
# run it on every change with `entr`
2727
brew install entr
28-
ls --color=never diff-so-fancy test/*.bats | entr ./test/bats/bin/bats test
28+
find ./* test/* test/fixtures/* -maxdepth 0 | entr ./test/bats/bin/bats test
2929
```
3030

3131
When writing assertions, you'll likely want to compare to expected output. To grab that reliably, you can use something like `git --no-pager diff | diff-so-fancy > output.txt`

test/bugs.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ load 'test_helper/util'
2626
output=$( load_fixture "add_remove_empty_lines" | $diff_so_fancy )
2727
run printf "%s" "$output"
2828

29-
assert_line --index 5 --partial "[7m[1;32" # green added line
30-
assert_line --index 8 --partial "[7m[1;31" # red removed line
29+
assert_line --index 5 --partial "5;22m" # green added line
30+
assert_line --index 8 --partial "5;52m" # red removed line
3131
}

0 commit comments

Comments
 (0)