`[todo] out/zzz_test_todo.res -> not yet implemented`
-The produced result file contains the magic string "NOT YET IMPLEMENTED".
+The produced result file contains a magic string, like `NOT YET IMPLEMENTED`.
Those are considered the same as expected errors (like a fixme)
It is a success.
-Some engines, libraries or program just print this to simplify the management of tests.
+The magic strings are listed in `todo` files in the root and `sav` directories.
+They are used by engines, libraries or program just print this to simplify the management of tests.
+
+Magic strings are used with `grep -f`, so each line is a pattern that is searched within the res files.
### Skipped
esac
done
OLD=`echo "$OLD" | sed -e 's/ */ /g' -e 's/^ //' -e 's/ $//'`
- grep 'NOT YET IMPLEMENTED' "$outdir/$pattern.res" >/dev/null
+ istodo "$outdir/$pattern.res"
NYI="$?"
if [ -n "$SAV" ]; then
if [ -n "$OLD" ]; then
return 1
}
+# Check that the resfile ($1) matches some magic strings in `todo` files.
+istodo()
+{
+ test "$no" = true && return 1
+ for savdir in $savdirs .; do
+ local f="$savdir/todo"
+ test -f "$f" || continue
+ if grep -f "$f" "$1" >/dev/null 2>&1; then
+ return 0
+ fi
+ done
+ return 1
+}
+
find_nitc()
{
local name="$enginebinname"