Skip to content

Commit 471c1b5

Browse files
committed
bats init in update-deps.sh
1 parent aa5cf05 commit 471c1b5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

hacking-and-testing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ cd ~/projects/catfabulator && git diff
1717
The tests use [bats-core](https://bats-core.readthedocs.io/en/latest/index.html), the Bash automated testing system.
1818

1919
```sh
20-
git submodule sync
21-
git submodule update --init
20+
# initalize the bats components
21+
git submodule sync && git submodule update --init
2222

2323
# run the test suite once:
2424
./test/bats/bin/bats test
@@ -28,7 +28,7 @@ brew install entr
2828
find ./* test/* test/fixtures/* -maxdepth 0 | entr ./test/bats/bin/bats test
2929
```
3030

31-
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`
31+
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`
3232

3333
You can lint your scripts via shellcheck, our CI bots will also check.
3434

update-deps.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
# initalize the bats components
4+
git submodule sync && git submodule update --init
5+
6+
37
DIFFHIGHLIGHT_RAW_URL_BASE="https://raw.githubusercontent.com/git/git/master/contrib/diff-highlight"
48
DIFFHIGHLIGHT_FILES=( "DiffHighlight.pm" "README" )
59

0 commit comments

Comments
 (0)