2 # Copyright 2019, The Tor Project, Inc.
3 # See LICENSE for licensing information
5 # Integration test for checkSpace.pl, which we want to rewrite.
10 # Skip this test if we're running on Windows; we expect line-ending
11 # issues in that case.
18 if test "$WINDOWS" = 1; then
19 # This magic value tells automake that the test has been skipped.
23 # make a safe space for temporary files
24 DATA_DIR
=$
(mktemp
-d -t tor_checkspace_tests.XXXXXX
)
25 trap 'rm -rf "$DATA_DIR"' 0
27 RECEIVED_FNAME
="${DATA_DIR}/got.txt"
29 cd "$(dirname "$0")/checkspace_tests"
31 # we expect this to give an error code.
32 ..
/checkSpace.pl
-C .
/*.
[ch
] .
/*/*.
[ch
] > "${RECEIVED_FNAME}" && exit 1
34 diff -u expected.txt
"${RECEIVED_FNAME}" ||
exit 1