We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4418961 commit bcd39fcCopy full SHA for bcd39fc
contrib/tests/shpproj.sh
@@ -21,8 +21,19 @@ readonly SCRIPTDIR=$(dirname "$0")
21
22
"${SHPDUMP:-$top_builddir/shpdump}" -precision 8 "test" > "test.out"
23
24
-
25
-if result=$(diff --strip-trailing-cr "$SCRIPTDIR/expect.out" "test.out"); then
+supports_strip_trailing_cr() {
+ diff --help 2>/dev/null | grep -q -- '--strip-trailing-cr'
26
+}
27
+
28
+run_diff() {
29
+ if supports_strip_trailing_cr; then
30
+ diff --strip-trailing-cr "$SCRIPTDIR/expect.out" "test.out"
31
+ else
32
+ diff "$SCRIPTDIR/expect.out" "test.out"
33
+ fi
34
35
36
+if result=$(run_diff); then
37
echo "******* Test Succeeded *********"
38
exit 0
39
else
0 commit comments