Test assertions for OpenI18N1.2 level1 - Utils -

No. Testset Name # Assertions Assertion
Shell implementation (Ref. [POSIX.2])
1 shell 9
  1. Verify if the shell judges the existence of files and directories whose names are written in portable filename character set with test command.
  2. Verify if an iteration statement (e.g. for) handles strings written in portable filename character set.
  3. Verify if a string written in portable filename character set is stored in a variable.
  4. Verify if an ordinary character included portable filename character set is matched itself.
  5. Verify if a `?' is matched any characters included in the portable filename character set.
  6. Verify if an `*' is matched any strings written in the portable filename character set.
  7. Verify if a matching list expression `[...]' is matched the characters which are in the list. The listed characters are included in the portable filename character set.
  8. Verify if a character class `[:class:]' is matched characters according to the current locale.
  9. Verify if a range expression `[c-c]' is matched one of the characters which is in the range. The range expression may not be matched multi-character collating element and the range expression can be based on code point order instead of collating element order.
Locale (Ref. [XCU5])
2 locale 7
  1. When LANG is set and other internationalization environment variables are not set, verify if this utility outputs the value of LANG in all categories.
  2. When an internationalization environment variable except LANG and LC_ALL is set and LC_ALL is not set, verify if this utility outputs the value of the environment variable at a category whose name is as same as each environment variable.
  3. When LC_ALL is set, verify if this utility outputs the value of LC_ALL in all categories.
  4. When -a option is specified, verify if this utility writes information about all available public locales.
  5. When -c option is specified, verify if this utility writes the names of selected locale categories.
  6. When -k option is specified, verify if this utility writes the names and values of selected keywords.
  7. When -m option is specified, verify if this utility writes names of available charmaps correctly.
3 localedef 11
  1. When no error occurred and the locale was successfully created, verify the exit value is 0.
  2. When warnings occurred and the locale was successfully created, verify the exit value is 1.
  3. When the locale specification exceeded implementation limits or the coded character set or sets used were not supported by the implementation, and no locale was created, verify the exit value is 2.
  4. When the capability to create new locales is not supported by the implementation, verify the exit value is 3.
  5. When warnings or errors occurred and no output was created, the exit value is more than 3.
  6. When the locale was successfully created, check the function which is effected by LC_CTYPE (e.g. isalpha) is executed correctly.
  7. When the locale was successfully created, check the function which is effected by LC_COLLATE (e.g. strcoll) is executed correctly.
  8. When the locale was successfully created, check the function which is effected by LC_MONETARY (e.g. localeconv) is executed correctly.
  9. When the locale was successfully created, check the function which is effected by LC_NUMERIC (e.g. localeconv) is executed correctly.
  10. When the locale was successfully created, check the function which is effected by LC_TIME (e.g. nl_langinfo) is executed correctly.
  11. When the locale was successfully created, check the function which is effected by LC_MESSAGE (e.g. nl_langinfo) is executed correctly.
Text Editor (Ref. [XCU5])
4 ed 1
  1. When a line which includes multibyte characters is edited with regular expression, verify this utility realizes character boundaries correctly.
5 ex 1
  1. When a line which includes multibyte characters is edited with regular expression, verify this utility realizes character boundaries correctly.
6 vi 3
  1. Verify the cursor can move per 1 character.
  2. Verify this utility can delete per 1 character.
  3. When a line which includes multibyte characters is edited with regular expression, verify this utility realizes character boundaries correctly.
Text Processing (Ref. [XCU5])
7 comm 2
  1. Verify this utility extracts the lines duplicated in file1 and file2 even if these files include multibyte character.
  2. Verify this utility extracts the lines duplicated in file1 and file2 when these files are ordered according to the collating sequence of the current locale.
8 diff 3
  1. Verify this utility compares text files which include multibyte characters.
  2. When -b option is specified, verify this utility interprets whitespace character according to the current locale.
  3. When -r option is specified, verify this utility handles files and directories whose names have multibyte characters.
9 egrep 5
  1. Verify this utility can handle the patterns which contain multibyte characters.
  2. Verify this utility can handle the files which contain multibyte patterns.
  3. Verify this utility can match the strings which contain multibyte characters.
  4. Verify this utility can match the files which contain multibyte characters.
  5. Verify this utility can perform pattern matching in searches without regard to case if -i option is specified.
10 expand 1
  1. Verify this utility determines the width in column positions each character would occupy on a constant-width font output device.
11 fgrep 5
  1. Verify this utility can handle the patterns which contain multibyte characters.
  2. Verify this utility can handle the files which contain multibyte patterns.
  3. Verify this utility can match the strings which contain multibyte characters.
  4. Verify this utility can match the files which contain multibyte characters.
  5. Verify this utility can perform pattern matching in searches without regard to case if -i option is specified.
12 fold 3
  1. When this utility folds the lines without -b option, verify each line is not folded in the middle of character.
  2. When this utility folds the lines with -b option, verify each line is not folded in the middle of character.
  3. When this utility folds the lines with -s option, verify this utility interprets blank characters according to the current locale.
13 grep 5
  1. Verify this utility can handle the patterns which contain multibyte characters.
  2. Verify this utility can handle the files which contain multibyte patterns.
  3. Verify this utility can match the strings which contain multibyte characters.
  4. Verify this utility can match the files which contain multibyte characters.
  5. Verify this utility can perform pattern matching in searches without regard to case if -i option is specified.
14 iconv 1
  1. Verify that the iconv utility can convert the encoding of characters in the file from one codeset to another and can write the results to standard output.
15 join 4
  1. Verify this utility joins files and writes the results correctly, when these files is ordered according to the collating sequence of the current locale.
  2. When -e option is specified, verify this utility replaces empty output fields in the list selected by -o with the string even if the string is written in multibyte characters.
  3. When -t option is specified, verify this utility uses given character as a separator even if the character is multibyte character.
  4. When -t option is not specified, verify blank characters according to the current locale are used as input field separators.
16*) more
(less)
4
  1. When standard output is terminal device, verify double width character is wrapped on the assigned width.
  2. When -p command option is specified and command means searching a string, verify the string is found correctly if it is a multibyte character string.
  3. When a command which means searching a string is going to be given, verify the multibyte characters are acceptable as the inputted string.
  4. When a command which means searching a string is given, verify the string is found correctly if it is a multibyte character string.
17**) mailx
(Mail)
1
  1. Verify this utility handles case-insensitive address correctly. (i.e. both the address `foo' and `FOO' are handled in the same way.)
18 nm 1
  1. When -v option is not specified, verify this utility sorts output according to the collating sequence of the current locale.
19 od 1
  1. When this utility writes floating-point formatted output, verify the floating-point character according to the current locale.
20 pr 6
  1. When -w option is specified, verify this utility truncates the lines to make the length of the lines be less than or equal to the assigned width.
  2. When -h option is specified, verify this utility uses the given string to replace the contents of the file operand in the page header even if the given string is written in multibyte characters.
  3. When -n option is specified, verify this utility uses the given character as the separator between line number and first column.
  4. When -s option is specified, verify this utility uses the given character as the separator during the columns.
  5. When -i option is specified, verify this utility uses the given character as the character which multiple space characters is replaced with. The replaced space characters are to the next tab stop.
  6. When -e option is specified, verify this utility uses the given character as the character which is replaced with multiple space characters. The number of space characters is defined so that next character stands at tab_stop.
21 printf 2
  1. Verify this utility correctly outputs multibyte characters even if format has the multibyte characters.
  2. Verify this utility correctly specifies a minimum field width when field width is defined.
(Single UNIX Specification Version.2 says this utility makes no special provision for dealing with multibyte characters when using the %c conversion specification or when a precision is specified in a %b or %s conversion specification.)
22 sed 6
  1. Verify this utility can handle the scripts which contain multibyte characters.
  2. Verify this utility can handle the script files which contain multibyte characters.
  3. Verify this utility can handle the patterns which contain multibyte characters.
  4. Verify this utility can handle the input strings which contain multibyte.
  5. Verify this utility can handle the input files which contain multibyte.
  6. Verify that `y' command handle strings per 1 character.
23 sort 48
  1. Verify this utility sorts lines according to the collating sequence of the current locale.
  2. When -u option is specified, verify duplicate lines are turned into one line even if the lines have multibyte characters.
  3. When -d option is specified, verify this utility interprets which character is a blank character or an alphanumeric character.
  4. When -f option is specified, verify this utility treats a lower-case character as same as its upper-case character.
  5. When -i option is specified, verify this utility interprets a printable character correctly.
  6. When -n option is specified, verify this utility sorts numeric order. (Especially check the radix character, thousands separator and minus sign are interpreted correctly.)
  7. When -b option is specified, verify this utility interprets which character is a blank character.
  8. When -t option is specified, verify this utility use a character as a field separator even if the character is a multibyte character.
  9. When -k keydef option is specified, verify this utility is able to define start/end position even if the lines have multibyte characters (Especially check about the character position. i.e. `field.character').
  10. When -k keydef option is specified and keydef has a character b, verify this utility interprets which character is a blank character in the range which defined by keydef.
  11. When -k keydef option is specified and keydef has a character d, verify this utility interprets which character is a blank character or an alphanumeric character in the range which defined by keydef.
  12. When -k keydef option is specified and keydef has a character f, verify this utility treats a lower-case character as same as its upper-case character in the range which defined by keydef.
  13. When -k keydef option is specified and keydef has a character i, verify this utility interprets a printable character correctly in the range which defined by keydef.
  14. When -k keydef option is specified and keydef has a character n, verify this utility sorts numeric order in the range which defined by keydef. (Especially check the radix character, thousands separator and sign are interpreted correctly.)
  15. When +pos option is specified, verify this utility is able to define start position even if the lines have multibyte characters (Especially check about the character position. i.e. `field.character').
  16. When -pos option is specified, verify this utility is able to define end position even if the lines have multibyte characters (Especially check about the character position. i.e. `field.character').
  17. When -c option is specified, verify this utility checks the file whose lines are sorted according to the collating sequence of the current locale.
  18. When -c and -u option are specified, verify this utility checks the file which has duplicate lines even if the lines have multibyte characters.
  19. When -c and -d option are specified, verify this utility interprets which character is a blank character or an alphanumeric character.
  20. When -c and -f option are specified, verify this utility treats a lower-case character as same as its upper-case character.
  21. When -c and -i option are specified, verify this utility interprets a printable character correctly.
  22. When -c and -n option are specified, verify this utility check the file whose lines are sorted numeric order. (Especially check the radix character, thousands separator and sign are interpreted correctly.)
  23. When -c and -b option are specified, verify this utility interprets which character is a blank character.
  24. When -c and -t option are specified, verify this utility use a character as a field separator even if the character is a multibyte character.
  25. When -c and -k keydef option are specified, verify this utility is able to define start/end position even if the lines have multibyte characters (Especially check about the character position. i.e. `field.character').
  26. When -c and -k keydef option are specified and the keydef has a character b, verify this utility interprets which character is a blank character in the range which defined by keydef.
  27. When -c and -k keydef option are specified and keydef has a character d, verify this utility interprets which character is a blank character or an alphanumeric character in the range which defined by keydef.
  28. When -c and -k keydef option is specified and keydef has a character f, verify this utility treats a lower-case character as same as its upper-case character in the range which defined by keydef.
  29. When -c and -k keydef option are specified and keydef has a character i, verify this utility interprets a printable character correctly in the range which defined by keydef.
  30. When -c and -k keydef option are specified and keydef has a character n, verify this utility check the file whose lines are sorted numeric order in the range which defined by keydef. (Especially check the radix character, thousands separator and sign are interpreted correctly.)
  31. When -c and +pos option are specified, verify this utility is able to define start position even if the lines have multibyte characters (Especially check about the character position. i.e. `field.character').
  32. When -c and-pos option are specified, verify this utility is able to define end position even if the lines have multibyte characters (Especially check about the character position. i.e. `field.character').
  33. When -m option is specified, verify the outputs this utility makes is sorted according to the collating sequence of the current locale.
  34. When -m and -u option are specified, verify duplicate lines are turned into one line even if the line have multibyte characters.
  35. When -m and -d option are specified verify this utility interprets which character is a blank character or an alphanumeric character.
  36. When -m and -f option are specified, verify this utility treats a lower-case character as same as its upper-case character.
  37. When -m and -i option are specified, verify this utility interprets a printable character correctly.
  38. When -m and -n option are specified, verify the outputs this utility makes is sorted numeric order. (Especially check the radix character, thousands separator and sign are interpreted correctly.)
  39. When -m and -b option are specified, verify this utility interprets which character is a blank character.
  40. When -m and -t option are specified, verify this utility use a character as a field separator even if the character is a multibyte character.
  41. When -m and -k keydef option are specified, verify this utility is able to define start/end position even if the lines have multibyte characters (Especially check about the character position. i.e. `field.character').
  42. When -m and -k keydef option are specified and keydef has a character b, verify this utility interprets which character is a blank character in the range which defined by keydef.
  43. When -m and -k keydef option are specified and keydef has a character d, verify this utility interprets which character is a blank character or an alphanumeric character in the range which defined by keydef.
  44. When -m and -k keydef option are specified and keydef has a character f, verify this utility treats a lower-case character as same as its upper-case character in the range which defined by keydef.
  45. When -m and -k keydef option are specified and keydef has a character i, verify this utility interprets a printable character correctly in the range which defined by keydef.
  46. When -m and -k keydef option are specified and keydef has a character n, verify the outputs this utility makes is sorted numeric order in the range which defined by keydef. (Especially check the radix character, thousands separator and sign are interpreted correctly.)
  47. When -m and +pos option are specified, verify this utility is able to define start position even if the lines have multibyte characters (Especially check about the character position. i.e. `field.character').
  48. When -m and -pos option are specified, verify this utility is able to define end position even if the lines have multibyte characters (Especially check about the character position. i.e. `field.character').
24 unexpand 1
  1. When -a option is specified and this utility processes tab and space characters, verify this utility determines the width in column positions each character would occupy on a constant-width font output device.
25 uniq 3
  1. Verify this utility compares text files which have multibyte characters.
  2. When -f option or -number is specified, this utility correctly recognizes the boundaries of words. The boundaries are shown as blank characters constituted in current locale.
  3. When -s option or +number is specified, this utility ignore the first n characters when doing comparisons even if the characters are multibyte characters.
26 wc 2
  1. When -m option is specified, verify this utility outputs the number of characters in each input file even if the characters are multibyte characters.
  2. When this utility writes to the standard output the number of words, this utility correctly recognizes the boundaries of words. The boundaries are shown as white-space characters constituted in current locale.
Filename Handling (Ref. [XCU5])
27 cpio 13
  1. When -o option is specified, verify this utility handles filenames which is written in file-system-safe characters.
  2. When -o and -v option is specified, verify this utility prints the names of the affected files which is written in file-system-safe characters.
  3. When -i option is specified, verify this utility handles filenames which is written in file-system-safe characters.
  4. When -i option is specified, if extract files is selected in pattern form, `*' is matched more than 0 file-system-safe characters.
  5. When -i option is specified, if extract files is selected in pattern form, `?' is matched 1 file-system-safe characters.
  6. When -i option is specified, if extract files is selected in pattern form, matching list expression `[...]' is matched any one of the enclosed file-system-safe characters.
  7. When -i option is specified, if extract files is selected in pattern form, a range expression `[c-c]' is matched any symbol between the pair (inclusive). The range expression may not be matched multi-character collating element and the range expression can be based on code point order instead of collating element order.
  8. When -i and -d option is specified, verify this utility creates the directory whose name is written in file-system-safe characters.
  9. When -i and -t option is specified, verify this utility prints the filename which is written in file-system-safe characters.
  10. When -i and -v option is specified, verify this utility prints the filename which is written in file-system-safe characters.
  11. When -p option is specified, verify this utility handles directory name which is written in file-system-safe characters.
  12. When -p and -d option is specified, verify this utility creates the directory whose name is written in file-system-safe characters.
  13. When -p and -v option is specified, verify this utility prints the filename which is written in file-system-safe characters.
28 find 10
  1. Verify this utility interprets a pathname which is written in file-system-safe characters.
  2. When -exec option is specified, this utility invokes another utility whose name is written in file-system-safe characters.
  3. When -exec option is specified, this utility replaces `{}' with adapted pathnames which is written in file-system-safe characters.
  4. When -print option is specified, verify this utility prints filenames which is written in file-system-safe characters.
  5. If -name option is specified and the search pattern has ordinary file-system-safe characters, verify the character is matched itself.
  6. If -name option is specified and the search pattern has `?', verify `?' is matched any file-system-safe characters.
  7. If -name option is specified and the search pattern has `*', verify `*' is matched any string written in file-system-safe characters.
  8. If -name option is specified and the search pattern has a matching list expression `[...]', verify the matching list expression is matched the character with the file-system-safe character which is in the list.
  9. If -name option is specified and the search pattern has a character class`[:class:]', verify the character class is matched a character which defined on the current locale.
  10. If -name option is specified and the search pattern has a range expression `[c-c]', verify the range expressions is matched a character which is in the range. The range expression may not be matched multi-character collating element and the range expression can be based on code point order instead of collating element order.
29 ls 3
  1. Verify this utility interprets filenames which is written in file-system-safe characters.
  2. When options which decide how to sort is not specified. verify this utility sorts output filename according to the collating sequence in the current locale.
  3. When -q option is specified, verify this utility force each instance of non-printable filename characters to be written as the question-mark `?' character.
30 tar 6
  1. When keyword `r' is specified, verify this utility attaches files whose names are written in file-system-safe characters.
  2. When keyword `c' is specified, verify this utility packed files whose names are written in file-system-safe characters into an archive.
  3. When keyword `t' is specified, verify this utility prints filenames which is written in file-system-safe characters.
  4. When keyword `u' is specified, verify this utility appends a given file if the archive has a file which is same name as the given one and the given one is newer. The names of these files are written in file-system-safe characters.
  5. When keyword `x' is specified, verify this utility extracts files whose names are written in file-system-safe characters.
  6. When keyword `f' is specified, verify this utility handles the filename which is written in file-system-safe characters.
General Text Editor
31 General Text Editor 2
  1. Verify cursor can move per 1 character in the text encoded in UTF-8
  2. Verify this utility can delete per character in the text encoded in UTF-8.
Terminal Emulator
32 Terminal Emulator 3
  1. Verify if locale dependent charset can be displayed.
  2. Verify if cursor can be displayed on double width character correctly.
  3. Verify if double width character is wrapped on the edge of terminal window.
Message Catalogs (Ref. LSB 1.3 `Command Behavior')
33 gencat 3
  1. Verify this utility merges the message text source files into a formatted message catalog even if message text source files is written in multibyte characters.
  2. When selected message catalog file already exists and the number of new message is not collide with the number of messages which already exists, verify new messages will be specified the file without deleting the message which already exists.
  3. When selected message catalog file already exists and the number of new message is collide with the number of messages which already exists, verify old message is replaced with the new message.
34 msgfmt 16
  1. Verify this utility creates message object file which can be gotten messages by gettext family library.
  2. When this utility creates message object file, verify that this utility does not change the portable object files.
  3. When input file is -, verify this utility read standard input.
  4. When `-D directory' or `--directory=directory' option is specified, verify that this utility searches the directory named directory.
  5. When `-f' or `--use-fuzzy' option is not specified, verify that the fuzzy entries are not included into the output.
  6. When `-f' or `--use-fuzzy' option is specified, verify that the fuzzy entries are included into the output.
  7. When `-o output-file' or `--output-file=output-file' option is not specified, verify that the name of output file is the same as domainname.
  8. When `-o output-file' or `--output-file=output-file' option is specified, verify that the name of output file is output-file.
  9. When `-o output-file' or `--output-file=output-file' option is specified, verify that all domain directives and duplicate msgids in the portable object file is ignored.
  10. When `-o output-file' or `--output-file=output-file' option is specified and output-file is -, verify that output is written to standard output.
  11. When `--strict' option is not specified, verify that the output filename is the same as the domainname.
  12. When `--strict' option is specified and the suffix `.mo' is not present at domainname, verify that this utility added the suffix to the output filename.
  13. When `--strict' option is specified and the suffix `.mo' is already present at domainname, verify that the output filename is same as the dommainname.
  14. When `-v' option is specified, verify that this utility detects and diagnoses input file anomalies which might represent translation errors.
  15. When this utility creates message object files from portable object files successfully, verify that the exit value is 0.
  16. When this utility does not create message object files from portable object files, verify that the exit value is higher than 0.
35 msgmerge 1
  1. Verify that the utility exists.
36 xgettext 1
  1. Verify that the utility exists.
Message Handling (Ref. LSB 1.3 `Command Behavior')
37 gettext 15
  1. When the operand `textdomain' is present, verify that this utility uses the value of the operand as dommain name.
  2. When `-d dommainname' or `--domain=dommainname' option is specified, verify this utility uses dommainname as dommain name.
  3. With the following situation, check that this utility uses the value of TEXTDOMAIN as dommain name.
    • The operand `textdomain' is not present.
    • `-d dommainname' and `--domain=dommainname' option are not specified.
    • The environment variable TEXTDOMAIN is set.
  4. With the following situation , verify that this utility prints msgid.
    • The operand `textdomain' is not present.
    • `-d dommainname' and `--domain=dommainname' option are not specified.
    • The environment variable TEXTDOMAIN is not set.
  5. When a corresponding string with msgid is not found, verify that this utility prints msgid.
  6. When the environment variable TEXTDOMAINDIR is set, verify that this utility uses the value of TEXTTDOMAINDIR as dirname.
  7. When the environment variable TEXTDOMAINDIR is not set, verify that the dirname is the implementation-defined default directory.
  8. Verify that the name of the current locale is used as lang.
  9. When `-e' option is specified, verify that this utility interprets \t for tab character.
  10. Verify that this utility use \\ to print backslash.
  11. When `-e' option is specified, verify that this utility interprets \n for newline character.
  12. When `-n' option is specified, verify that this utility suppress trailing newline.
  13. When `-s' option is specified, verify that the behavior of this utility is similar to the behavior of the echo utility except to translate the message which is found in the selected catalog.
  14. When this utility executed successfully, verify that the exit value is 0.
  15. When an error occured, verify that the exit value is higher than 0.

*) Both `more' and `less' must be tested. But either `more' or `less' is passed the test, you may understand the 16th item is passed.
**) Both `mailx' and `Mail' must be tested. But either `mailx' or `Mail' is passed the test, you may understand the 17th item is passed.


References
[POSIX.2]
ISO/IEC 9945-1:1996 Information technology - Portable Operating System Interface (POSIX) - Part 1: System Application Program Interface (API) [C Language]
[XCU5]
The Single UNIX Specification, Version 2

Command and Utilities, Issue 5
(The Open Group CAE Specification C604)
[XSH5]
The Single UNIX Specification, Version 2

System Interfaces and Headers, Issue 5 (2 volumes)
(The Open Group CAE Specification C606)