Dirk,

On Wed, Feb 19, 2025 at 12:13:00PM +0000, Mark Hindley wrote:
> > You could create the folder on the fly in the run script, see patch below.

Actually that doesn't always work either. I think diff --unidirectional-new-file
is a better solution.

Mark

commit 42de0bfbe83950cfd70f8e46408822ba8b34f8c3
Author: Mark Hindley <m...@hindley.org.uk>
Date:   Wed Feb 19 12:18:11 2025 +0000

    ./t/run: use diff --unidirectional-new-file to handle missing (empty) 
expected/{target,state} directories.
    
    Thanks: Dirk Mayer <dirk.ma...@siemens.com>

diff --git a/t/run b/t/run
index 21da6b1..d699255 100755
--- a/t/run
+++ b/t/run
@@ -64,8 +64,8 @@ else
 fi
 mount -t tmpfs tmpfs /tmp
 ./test | diff -u expected/output -
-diff -ur expected/target $UCF_TEST_TARGET
-diff -ur expected/state /var/lib/ucf
+diff -ur --unidirectional-new-file expected/target $UCF_TEST_TARGET
+diff -ur --unidirectional-new-file expected/state /var/lib/ucf
 EOF
     success=$((success+1))
 done

Reply via email to