#!/bin/sh # Define test candidates: # both must start with "/home/" and end on "df" (see sed command below) DF_OLD=/home/berny/git/coreutils-8.19/inst/bin/df DF_NEW=/home/berny/coreutils/src/df TEST_SH=/tmp/dftest.tmp.sh OUT_OLD=/tmp/dftest.out.old OUT_NEW=/tmp/dftest.out.new function dfprep { printf "#!/bin/sh \n" printf "DF=\"\$1\" \n" for o in '' -i -h -hi -P -hP -Ph -iP -Pi -hiP -a -l '-t ext3' '-t typo' '-x ext3' '-x typo' do for s in '' -k -m -Bk -BkB -BkiB -B1k -B1kB -B1kiB -Bsi -Bhuman-readable do for t in '' '--total' do for p in '' '.' do printf " \"\$DF\" $o $s $t $p || echo \$? \n" printf "BLOCKSIZE=1M \"\$DF\" $o $s $t $p || echo \$? \n" printf "BLOCK_SIZE=1M \"\$DF\" $o $s $t $p || echo \$? \n" printf "DF_BLOCK_SIZE=1M \"\$DF\" $o $s $t $p || echo \$? \n" done done done done } dfprep > $TEST_SH sync sh -x $TEST_SH $DF_OLD > $OUT_OLD 2>&1 sh -x $TEST_SH $DF_NEW > $OUT_NEW 2>&1 for f in $OUT_OLD $OUT_NEW do sed -i \ -e '1n; s/\/home\/.*\/df/df/' \ -e 's/^\(total.*%\)$/\1 -/' \ $f for x in 3 2 1 ; do sed -i \ -e "s/ \([0-9]\{12\}\)\([^0-9]\)/ abcdefghijkl\2/; s/ \([0-9]\{11\}\)\([^0-9]\)/ abcdefghijk\2/; \ s/ \([0-9]\{10\}\)\([^0-9]\)/ abcdefghij\2/; \ s/ \([0-9]\{9\}\)\([^0-9]\)/ abcdefghi\2/; \ s/ \([0-9]\{8\}\)\([^0-9]\)/ abcdefgh\2/; \ s/ \([0-9]\{7\}\)\([^0-9]\)/ abcdefg\2/; \ s/ \([0-9]\{6\}\)\([^0-9]\)/ abcdef\2/; \ s/ \([0-9]\{5\}\)\([^0-9]\)/ abcde\2/; \ s/ \([0-9]\{4\}\)\([^0-9]\)/ abcd\2/; \ s/ \([0-9]\{3\}\)\([^0-9]\)/ abc\2/; \ s/ \([0-9]\{2\}\)\([^0-9]\)/ ab\2/; \ s/ \([0-9]\{1\}\)\([^0-9]\)/ a\2/ " \ $f done done meld $OUT_OLD $OUT_NEW &