From 0e51c6776c0c0828f47a54c745cbdeb0a7389abf Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Sep 19 2017 01:41:21 +0000 Subject: Adapt to filelist not including "./". --- diff --git a/test/filelist/test b/test/filelist/test index 8c79649..38757bb 100755 --- a/test/filelist/test +++ b/test/filelist/test @@ -34,10 +34,11 @@ test_skip () { assertTrue 'create_filelist -s must skip the file lists in the top directory' "file_contains $tl dir2/${tl:t}" assertTrue 'create_filelist -s must skip the file lists in the top directory' "file_contains $tl dir3/${fl:t}" - assertFalse 'create_filelist -s must skip the file lists in the top directory' "file_contains $fl ^./${tl:t}" - assertFalse 'create_filelist -s must skip the file lists in the top directory' "file_contains $fl ^./${fl:t}" - assertTrue 'create_filelist -s must skip the file lists in the top directory' "file_contains $fl /dir2/${tl:t}" - assertTrue 'create_filelist -s must skip the file lists in the top directory' "file_contains $fl /dir3/${fl:t}" + # These are highly dependent on whether the filelist lines start with "./". Currently they don't. + assertFalse 'create_filelist -s must skip the file lists in the top directory' "file_contains $fl ^${tl:t}" + assertFalse 'create_filelist -s must skip the file lists in the top directory' "file_contains $fl ^${fl:t}" + assertTrue 'create_filelist -s skipped a file list in a subdirectory' "file_contains $fl dir2/${tl:t}" + assertTrue 'create_filelist -s skipped a file list in a subdirectory' "file_contains $fl dir3/${fl:t}" } test_skip_files () { @@ -48,9 +49,10 @@ test_skip_files () { assertFalse 'create_filelist -S must skip specified files' "file_contains $tl \"\d+TABdir2\"" assertTrue 'create_filelist -S must skip file only in toplevel' "file_contains $tl \"\d+TABdir1/file1\"" - assertFalse 'create_filelist -S must skip specified files' "file_contains $fl ^./file1" - assertFalse 'create_filelist -S must skip specified files' "file_contains $fl ^./dir2" - assertTrue 'create_filelist -S must skip file only in toplevel' "file_contains $fl /dir1/file1" + # These are highly dependent on whether the filelist lines start with "./". Curently they don't. + assertFalse 'create_filelist -S must skip specified files' "file_contains $fl ^file1" + assertFalse 'create_filelist -S must skip specified files' "file_contains $fl ^dir2" + assertTrue 'create_filelist -S must skip file only in toplevel' "file_contains $fl ^dir1/file1" } @@ -220,7 +222,7 @@ test_dangling_symlink () { test_subtrees () { # Test the subtree functionality - assertTrue 'File list creation did not succeed' "$cf -d $td -t $tl >$so 2>$se" + assertTrue 'File list creation did not succeed' "$cf -d $td -t $tl -C file0 >$so 2>$se" # Get some times local time11=$(awk -F '\t' '/\tdir1\/file1$/ {print $1}' $tl) @@ -238,7 +240,7 @@ test_subtrees () { assertFalse '--subtree without --oldfile should fail' "$cf -d $td -t $tl --subtree dir2 >$so 2>$se" # Recreate the file lists using --subtree for two of the changed subtrees - assertTrue 'File list creation with subtrees did not succeed' "$cf -d $td -t $tl --oldfile $tl-old --subtree dir1 --subtree dir3 >$so 2>$se" + assertTrue 'File list creation with subtrees did not succeed' "$cf -d $td -t $tl -C file0 --oldfile $tl-old --subtree dir1 --subtree dir3 >$so 2>$se" # Check that the specified subtrees were updated and any others were not. local time21=$(awk -F '\t' '/\tdir1\/file1$/ {print $1}' $tl) @@ -249,6 +251,9 @@ test_subtrees () { assertEquals 'Files in non-included subtree must not change' $time12 $time22 assertNotEquals 'Files in included subtree must change' $time13 $time23 + # XXX Ensure original file and subtree run without changes produce identical results (after sorting) + # XXX Ensure checksums work + # XXX Ensure imagelist works }