summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/difftest.sh
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-18 17:53:35 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-19 19:27:29 +0900
commitc0a6f1b84c84749908961579b84513fd9f9d9eac (patch)
treeace7ba60cb031acd3a1f4ff10f7bbc5668fa801f /debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/difftest.sh
parent52e5ffe140f0f4402e97936447bc9a606045d2b5 (diff)
downloadextra-dependencies-c0a6f1b84c84749908961579b84513fd9f9d9eac.tar.gz
extra-dependencies-c0a6f1b84c84749908961579b84513fd9f9d9eac.zip
uncrustify-trinity: updated based on upstream version 0.78.0
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/difftest.sh')
-rwxr-xr-xdebian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/difftest.sh51
1 files changed, 51 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/difftest.sh b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/difftest.sh
new file mode 100755
index 00000000..053cae17
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/difftest.sh
@@ -0,0 +1,51 @@
+#! /bin/sh
+# Shows the difference for a failed test
+#
+
+if [ -n "$1" ] ; then
+ case "$1" in
+ -h|--help|--usage)
+ fn=$(basename $0)
+ echo "Usage: $fn [TEST [LANG]]"
+ echo
+ echo " TEST : the test number pattern, may contain wildcards"
+ echo " LANG : the language folder name: c, cpp, cs, d, java, oc, pawn, sql"
+ echo
+ echo "The script will find all matching tests in the output folder and diff them against the same"
+ echo "file in the results folder. The language is only required if the same test number is used"
+ echo "for multiple languages and you only want to see one of them."
+ echo
+ echo "Examples:"
+ echo "$fn # show all test failures"
+ echo "$fn 30014 # show test failure 30014"
+ echo "$fn '*' cpp # show all CPP test failure"
+ exit 1
+ ;;
+ esac
+fi
+
+# Use '*' as the pattern if one wasn't defined
+patt=$1
+if [ -z "$patt" ] ; then
+ patt="*"
+fi
+path="output"
+if [ -n "$2" ] ; then
+ path="$path/$2"
+fi
+
+# Find the tests that match, remove the .svn folders
+files=$(find $path -name "$patt-*" -type f | sed "/\.svn/d")
+
+did1=''
+for t in $files ; do
+ other=$(echo $t | sed "s/^output/results/")
+ diff -u $t $other
+ if [ "$?" = "1" ] ; then
+ did1='yup'
+ fi
+done
+
+if [ -z "$did1" ] ; then
+ echo "No differences"
+fi