X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c9dcf6981fac0969eca871a12a4d22d96c69fb3a..213e031dda6a34c50c04de0d6041f45ab2db0a91:/test/format/test-ap?ds=inline diff --git a/test/format/test-ap b/test/format/test-ap index 517ba40c..8cab4b0a 100755 --- a/test/format/test-ap +++ b/test/format/test-ap @@ -14,19 +14,33 @@ setup_test # Use proper program, likely not the first one on PATH. ap="${MH_LIBEXEC_DIR}/ap" +start_test 'ambiguous switch' check_exit '-eq 1' $ap - +start_test 'invalid switch' check_exit '-eq 1' $ap -xyzzy +start_test 'help' check_exit '-eq 0' $ap -help +start_test 'version' check_exit '-eq 0' $ap -version +start_test 'missing -form argument' check_exit '-eq 1' $ap -format foo -form +start_test 'missing -format argument' check_exit '-eq 1' $ap -form foo -format +start_test 'missing -width argument' check_exit '-eq 1' $ap -width x=tendixzehn l=$x$x$x$x$x c=$l$l +start_test 'more than 100 addresses' check_exit '-eq 1' $ap `echo $c | sed 's/./ &/g'` 101 +start_test 'no addresses' check_exit '-eq 1' $ap +start_test 'success, though alias not found' COLUMNS=1 check_exit '-eq 0' $ap foo + +#### Make sure that 8-bit character is properly interpreted. +require_locale en_US.UTF-8 en_US.UTF8 en_US.utf-8 en_US.utf8 +start_test 'address with 8-bit character' check_exit '-eq 1' $ap -width 0 `printf 'f\357o'` finish_test