Commits

ZyX_I  committed b568664

Added updateouts.zsh helper script

  • Participants
  • Parent commits 4b4b962

Comments (0)

Files changed (1)

File test/updateouts.zsh

+#!/bin/zsh
+
+autoload colors && colors
+
+typeset -gr TEMPDIR=$0:a:h:h:h/repository/tmp
+
+cd $0:a:h
+
+if test -e $TEMPDIR/failed.lst ; then
+    cat $TEMPDIR/failed.lst | cut -d' ' -f 2 | \
+        while read l ; do
+            othername=$TEMPDIR/test/$l.out
+            diff -u $l.ok $othername
+            echo -n "\e[${color[yellow]}mUpdate $l?\e[0m "
+            read -q update || continue
+            cp $othername $l.ok
+        done
+fi
+
+for TEST in *.in ; do
+    TEST=$TEST:r
+    test -e $TEST.ok && continue
+    othername=$TEMPDIR/test/$TEST.out
+    test -e $othername || continue
+    cat $othername
+    echo -n "\n\e[${color[yellow]}mCopy $TEST?\e[0m "
+    read -q copy || continue
+    cp $othername $TEST.ok
+done