mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
Correct syntax & formatting in test_pratracker.sh
Use 4 spaces for indentations. Use the same syntax for all functions. No real code changes (except removal of unnecessary ";" from "exit 1" command).
This commit is contained in:
parent
984e3a9c6c
commit
bbbeed942f
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Fail if any subprocess fails unexpectedly
|
# Fail this script if any subprocess fails unexpectedly.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
umask 077
|
umask 077
|
||||||
@ -27,7 +27,7 @@ PRACTRACKER_DIR="scripts/maint/practracker"
|
|||||||
TMPDIR="$(mktemp -d -t pracktracker.test.XXXXXX)"
|
TMPDIR="$(mktemp -d -t pracktracker.test.XXXXXX)"
|
||||||
if test -z "${TMPDIR}" || test ! -d "${TMPDIR}" ; then
|
if test -z "${TMPDIR}" || test ! -d "${TMPDIR}" ; then
|
||||||
echo >&2 "mktemp failed."
|
echo >&2 "mktemp failed."
|
||||||
exit 1;
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DATA="${PRACTRACKER_DIR}/testdata"
|
DATA="${PRACTRACKER_DIR}/testdata"
|
||||||
@ -43,6 +43,7 @@ run_practracker() {
|
|||||||
--terse \
|
--terse \
|
||||||
"${DATA}/" "$@" || echo "practracker exit status: $?"
|
"${DATA}/" "$@" || echo "practracker exit status: $?"
|
||||||
}
|
}
|
||||||
|
|
||||||
compare() {
|
compare() {
|
||||||
# we can't use cmp because we need to use -b for windows
|
# we can't use cmp because we need to use -b for windows
|
||||||
diff -b -u "$@" > "${TMPDIR}/test-diff" || true
|
diff -b -u "$@" > "${TMPDIR}/test-diff" || true
|
||||||
|
Loading…
Reference in New Issue
Block a user