Skip to content
Snippets Groups Projects
Commit f06c44f4 authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

debian/tests/basic-command-line: Move from deprecated ADTTMP to AUTOPKGTEST_TMP.

parent 98da3add
No related branches found
No related tags found
No related merge requests found
Pipeline #82227 passed
...@@ -5,31 +5,31 @@ ...@@ -5,31 +5,31 @@
# to have diffoscope able to output stuff in utf-8 # to have diffoscope able to output stuff in utf-8
export LC_ALL=C.UTF-8 export LC_ALL=C.UTF-8
if ! [ -d "$ADTTMP" ]; then if ! [ -d "$AUTOPKGTEST_TMP" ]; then
ADTTMP=`mktemp -d` AUTOPKGTEST_TMP=`mktemp -d`
TEMP=true TEMP=true
fi fi
echo "a" > $ADTTMP/a echo "a" > $AUTOPKGTEST_TMP/a
echo "a" > $ADTTMP/a_ echo "a" > $AUTOPKGTEST_TMP/a_
echo "b" > $ADTTMP/b echo "b" > $AUTOPKGTEST_TMP/b
echo "Testing identical files..." echo "Testing identical files..."
diffoscope $ADTTMP/a $ADTTMP/a_ diffoscope $AUTOPKGTEST_TMP/a $AUTOPKGTEST_TMP/a_
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Exit code was different from 0 when comparing files with identical content." >&2 echo "Exit code was different from 0 when comparing files with identical content." >&2
exit 1 exit 1
fi fi
echo "Testing different files..." echo "Testing different files..."
diffoscope $ADTTMP/a $ADTTMP/b diffoscope $AUTOPKGTEST_TMP/a $AUTOPKGTEST_TMP/b
if [ $? -ne 1 ]; then if [ $? -ne 1 ]; then
echo "Exit code was different from 1 when comparing files with different content." >&2 echo "Exit code was different from 1 when comparing files with different content." >&2
exit 1 exit 1
fi fi
echo "Testing LC_ALL=C works..." echo "Testing LC_ALL=C works..."
LC_ALL=C diffoscope --debug $ADTTMP/a $ADTTMP/a_ 2>/dev/null LC_ALL=C diffoscope --debug $AUTOPKGTEST_TMP/a $AUTOPKGTEST_TMP/a_ 2>/dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "diffoscope could not handle LC_ALL=C; make sure you're not unconditionally outputting non-ascii chars anywhere." >&2 echo "diffoscope could not handle LC_ALL=C; make sure you're not unconditionally outputting non-ascii chars anywhere." >&2
exit 1 exit 1
...@@ -50,7 +50,7 @@ if [ $? -ne 2 ]; then ...@@ -50,7 +50,7 @@ if [ $? -ne 2 ]; then
fi fi
if [ -n "${TEMP:-}" ]; then if [ -n "${TEMP:-}" ]; then
rm -rf "$ADTTMP" rm -rf "$AUTOPKGTEST_TMP"
fi fi
echo "All good!" echo "All good!"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment