To test the rules;
cd test
./test.sh
Steps:
-
The
test.sh
script runs some test functions that exercise the gitignore rules. -
The script saves results into the
results
directory, so you can take a look. -
The script calculates various outputs by using
diff $actual $expect
.
The outputs are essentially based on these two commands:
git check-ignore -v
git status --ignored
Example directory structure for the function test_dot_rules
:
test
results
test_dot_rules
git_check_ignore
actual.txt
expect.txt
git_status
actual.txt
expect.txt