Add test for dd val=2x3x4 posix syntax.

I didn't add it to dd's help because $((MATH)) exists in modern shells,
but coreutils' mailing list got a bug report about having broken it,
so somebody's script somewhere still cares...
This commit is contained in:
Rob Landley 2023-06-14 16:45:24 -05:00
parent af055dabfc
commit f906363500

View File

@ -15,6 +15,8 @@ testing "count=2" "dd if=input count=2 ibs=1 $opt" "hi" "high\n" ""
testing "count= 2" "dd if=input 'count= 2' ibs=1 $opt" "hi" "high\n" ""
toyonly testing "count=0x2" "dd if=input 'count=0x2' ibs=1 $opt" "hi" \
"high\n" ""
testing 'posix 2x3x4' "dd if=input count=2x3x4 ibs=1 $opt" \
'abcdefghijklmnopqrstuvwx' 'abcdefghijklmnopqrstuvwxyz' ''
testing "count=-2" "dd if=input 'count=-2' ibs=1 2>/dev/null || echo errored" "errored\n" "" ""
testing "if=(file)" "dd if=input $opt" "I WANT\n" "I WANT\n" ""