gitstats: Added a test that verifies the HEAD revision hash
[git-stats.git] / src / t / t8100-stats.sh
blob748acf124ddfe20b279d66de6c5f1b7e6c9a7662
1 #!/bin/sh
3 # Copyright (c) 2008 Sverre Rabbelier
6 test_description='stats tests (basics)
8 This test verifies that the basic stats commands work as expected.'
10 . ./test-lib.sh
12 test_expect_success pre-clean '
13 rm -fr "/tmp/freshrepo" || {
14 trap - exit
15 echo >&5 "FATAL: Cannot clean the fresh repo"
16 exit 1
20 test_expect_success setup '
21 ../../scripts/setupRepo.py
22 cd /tmp/freshrepo
25 test_expect_success 'Verify that the expected tree was created' '
26 test `git rev-parse HEAD` = "90663811ccca2398df51c0b3c971ef9d3834989a"
29 test_expect_failure 'Test that commitsOfTouchedChanges outputs the proper result' '
30 stats.py --commits-that-touched HEAD
33 test_done