1 # Helper to create files with unique contents
3 # Create multiple files with unique contents within this test run. Takes the
4 # number of directories, the number of files in each directory, and the base
7 # test_create_unique_files 2 3 my_dir -- Creates 2 directories with 3 files
8 # each in my_dir, all with contents
9 # different from previous invocations
10 # of this command in this run.
12 test_create_unique_files
() {
13 test "$#" -ne 3 && BUG
"3 param"
22 local basedata
="$basedir$test_tick" &&
24 for i
in $
(test_seq
$dirs)
26 local dir
="$basedir/dir$i" &&
28 for j
in $
(test_seq
$files)
30 counter
=$
((counter
+ 1)) &&
31 echo "$basedata.$counter">"$dir/file$j.txt"