Commits

Peter Szilagyi  committed 143c47f

updated ocp-indent location

  • Participants
  • Parent commits b0eca7a

Comments (0)

Files changed (1)

File ocp-indent/test-ocp-indent

 #!/bin/bash
 
+# CR pszilagyi: Should use this in regressions/runtests, I think.
+
 set -e -u -o pipefail
 
 if (( $# != 1 )); then
 fi
 
 file=$1; shift
-indent=ocp-indent
+indent=$(dirname "$0")/"../bin/ocp-indent"
 tmp_dir=/tmp/ocp-indent
 tmp_file=$tmp_dir/$file
 diff_file=$tmp_file.diff
 rm -f $tmp_file $diff_file
 
 ocp-indent $file > $tmp_file
-diff $file $tmp_file > $diff_file || true
-if [[ -s $diff_file ]]; then
+
+if diff -u $file $tmp_file > $diff_file; then
     #echo "----------------------------"
     echo "Indentations differ on $file"
     echo