if [ ! -e "$2" ]; then
test_failed_internal "expect_equal_content: $2 missing"
fi
- if ! cmp -s "$1" "$2"; then
- test_failed_internal "$1 and $2 differ"
- fi
-}
-
-expect_equal_text_content() {
- if [ ! -e "$1" ]; then
- test_failed_internal "expect_equal_text_content: $1 missing"
- fi
- if [ ! -e "$2" ]; then
- test_failed_internal "expect_equal_text_content: $2 missing"
- fi
if ! cmp -s "$1" "$2"; then
test_failed_internal "$1 and $2 differ: $(echo; diff -u "$1" "$2")"
fi
expect_stat preprocessed_cache_hit 0
expect_stat cache_miss 1
expect_stat files_in_cache 1
- expect_equal_text_content reference_stderr.txt stderr.txt
+ expect_equal_content reference_stderr.txt stderr.txt
$CCACHE_COMPILE -Wall -c stderr.c -fsyntax-only 2>stderr.txt
expect_stat preprocessed_cache_hit 1
expect_stat cache_miss 1
expect_stat files_in_cache 1
- expect_equal_text_content reference_stderr.txt stderr.txt
+ expect_equal_content reference_stderr.txt stderr.txt
# -------------------------------------------------------------------------
TEST "Empty object file"
$CCACHE_COMPILE -c test.c $dep_args $obj_args
expect_stat direct_cache_hit 0
expect_stat cache_miss 1
- expect_equal_text_content $dep_file.real $dep_file
+ expect_equal_content $dep_file.real $dep_file
# cache hit
$CCACHE_COMPILE -c test.c $dep_args $obj_args
expect_stat direct_cache_hit 1
expect_stat cache_miss 1
- expect_equal_text_content $dep_file.real $dep_file
+ expect_equal_content $dep_file.real $dep_file
# change object file name
$CCACHE_COMPILE -c test.c $dep_args -o another.o
- expect_equal_text_content another.d.real $another_dep_file
+ expect_equal_content another.d.real $another_dep_file
done
done