chiark / gitweb /
tests: Introduce `diff' proc
[secnet.git] / mtest / common.tcl
index e3b67c40a55242d6430266e6bd704d983fff44e9..a016dae85fd35b3fb13d3f8c994865873210000e 100644 (file)
@@ -17,13 +17,17 @@ proc run-mss-userv {user group args} {
 
 proc run-mss {args} { eval [list exec] [mss-program] $args }
 
+proc diff {a b seddery} {
+    exec bash -c "
+       diff -u <($seddery $a) \\
+               <($seddery $b)
+    "
+}
+
 proc diff-output {expected got suffix} {
     global seddery
     global tmp
-    exec bash -c "
-       diff -u <($seddery mtest/$expected$suffix) \\
-               <($seddery $tmp/$got$suffix      )
-    "
+    diff mtest/$expected$suffix $tmp/$got$suffix $seddery
 }
 
 file mkdir $tmp/groupfiles