Report 0711 Actions
Problem Report Number |
0711 |
Submitter's Classification |
Test Suite problem |
State |
Resolved |
Resolution |
Permanent Interpretation (PIN) |
Problem Resolution ID |
PIN.X.0104 |
Raised |
1970-01-01 08:00 |
Updated |
2003-03-13 08:00 |
Published |
1995-11-27 08:00 |
Product Standard |
Commands and Utilities V2 (UNIX 95) |
Certification Program |
The Open Brand certification program |
Test Suite |
VSC version 4.1.4 |
Test Identification |
XOPEN.cmd/nl 1001 1002 1005 1008 1014 1037 |
Specification |
Commands and Utilities Issue 4 Version 2 |
Location in Spec |
See Problem Text |
Problem Summary |
PIN4C.00010 Alternate test behavior was recommended by VWG/053/092593 |
Problem Text |
The X/Open interpretation request (VWG/053/092593) was recently resolved. The outcome of the resolution was that the standard was "incorrect" or more correctly not what was intended. The wording was changed and recommended to be included in a future revision. The standard states -b type Specify which logical page body lines are to be numbered. Recognised types and their meaniings are: . . . t Number only lines with text consisting entirely of characters in the current locale's graph character class. . . . ^^^^^ The default type for logical page body is t (text lines numbered). In the POSIX locale, the 'print' character class is defined as printable characters, including the space character, and the 'graph' character class is defined as printable characters, not including the space character. To me, that says that with '-b t' (which is the default behavior), any lines that contain a space will not be numbered.
|
Test Output |
400|523 1001 1 08:51:36|IC Start 200|523 1 08:51:36|TP Start 520|523 1 18439 1 1|Assertion #1001 (A): Verify that nl reads from file and reproduces with line numbers. 520|523 1 18439 1 1|"^[ ]*1[ ][ ]*first line" wasn't found in standard output 520|523 1 18439 1 2|"^[ ]*2[ ][ ]*second line" wasn't found in standard output 520|523 1 18439 1 3|"^[ ]*3[ ][ ]*third line" wasn't found in standard output 220|523 1 1 08:51:37|FAIL 410|523 1001 1 08:51:37|IC End 400|523 1002 1 08:51:37|IC Start 200|523 1 08:51:37|TP Start 520|523 1 18439 1 1|Assertion #1002 (A): Verify that nl reads from stdin and reproduces with line numbers. 520|523 1 18439 1 1|"^[ ]*1[ ][ ]*first line" wasn't found in standard output 520|523 1 18439 1 2|"^[ ]*2[ ][ ]*second line" wasn't found in standard output 520|523 1 18439 1 3|"^[ ]*3[ ][ ]*third line" wasn't found in standard output 220|523 1 1 08:51:38|FAIL 410|523 1002 1 08:51:38|IC End 400|523 1005 1 08:51:40|IC Start 200|523 1 08:51:40|TP Start 520|523 1 18439 1 1|Assertion #1005 (A): Verify 'nl -b t' number lines with text in current locale's graph character classification. 520|523 1 18439 1 1|There is an X/Open interpretation request (VWG/053/092593) concerning the behaviour of the "t" option argument. 520|523 1 18439 1 2|"^[ ]*1[ ][ ]*second line" wasn't found in standard output 220|523 1 1 08:51:41|FAIL 410|523 1005 1 08:51:41|IC End 400|523 1008 1 08:51:43|IC Start 200|523 1 08:51:43|TP Start 520|523 1 18439 1 1|Assertion #1008 (A): Verify 'nl' without '-b' defaults to 'nl -b t'. 520|523 1 18439 1 1|There is an X/Open interpretation request (VWG/053/092593) concerning the behaviour of the "t" option argument. 520|523 1 18439 1 2|"^[ ]*1[ ][ ]*second line" wasn't found in standard output 220|523 1 1 08:51:44|FAIL 410|523 1008 1 08:51:44|IC End 400|523 1014 1 08:51:49|IC Start 200|523 1 08:51:49|TP Start 520|523 1 18439 1 1|Assertion #1014 (A): Verify that 'nl -f a' shall number all logical page footer lines. 520|523 1 18439 1 1|"^[ ]*2[ ][ ]*third line A" wasn't found in standard output 520|523 1 18439 1 2|"^[ ]*2[ ][ ]*third line B" wasn't found in standard output 220|523 1 1 08:51:50|FAIL 410|523 1014 1 08:51:50|IC End 400|523 1037 1 08:52:12|IC Start 200|523 1 08:52:12|TP Start 520|523 1 18439 1 1|Assertion #1037 (A): Verify that 'nl' writes to stdout in specified format. 520|523 1 18439 1 1|"1.*first line" wasn't found in standard output 520|523 1 18439 1 2|"2.*second line" wasn't found in standard output 520|523 1 18439 1 3|"3.*third line" wasn't found in standard output 220|523 1 1 08:52:13|FAIL 410|523 1037 1 08:52:13|IC End
|
Review Information
Review Type |
TSMA Review |
Start Date |
null |
Completed |
null |
Status |
Complete |
Review Recommendation |
No Resolution Given |
Review Response |
VWG/053/092593 states Problem: In the XCU4 specification, the -b t option of the nl command is described as causing nl to number only lines with text consisting entirely of characters in the current locale's "graph" character classification. This is the default action of nl as well. The graph character classification in the POSIX locale does not include the space character (nor the tab character for that matter). This causes the default (-b t) action of nl to NOT number lines that contain a space character. This does not seem to be what was intended. Historical versions of this command simply do not number empty lines in the text (i.e. lines that consist only of a new-line character). SVID 3 (see below) states that only lines with printable text will be numbered. It seems that neither of these definitions are completely accurate or reflective of the expected functionality from nl. However, the description as translated from SVID 3 seems to be the closest to the desired behaviour. Therefore, we would suggest that a change be made to the description of the -b t (and default) option of nl to number only lines consisting of characters in the print character class. Relevant references: The SVID 3 specification of the nl command states that the default option 't' numbers lines with printable text only. If you translate this to mean characters in the "print" class, then the space character would be included. Note, however, that a <tab> is not in the "print" class, so any line with a <tab> in it would NOT be numbered by default. X/Open Resolution: --------------------------- Historical practice has been for the -b t option to number only non-empty lines, where this is defined in the XBD as: empty line A line consisting of only a newline character. It is recommended that the description be changed to this in a future revision and that either description be conforming for this edition of the specification. This resolution does not specifically reference the -h and -f options which are being tested above. But the current spec states -h type Specify the same as b type except for header. The default type for logical page header is n (no lines numbered). -f type Specify the same as b type except for footer. The default for logical page footer is n (no lines numbered). We assume the resolution intended to define new behavior for these options as well. A permanent interpretation is recommended.
|
Review Type |
Expert Group Review |
Start Date |
null |
Completed |
null |
Status |
Complete |
Review Resolution |
No Resolution Given |
Review Conclusion |
The consultant's recommendation should be followed. A permanent interpretation should be granted.
|
Review Type |
SA Review |
Start Date |
null |
Completed |
null |
Status |
Complete |
Review Resolution |
Permanent Interpretation (PIN) |
Review Conclusion |
A Permanent Interpretation is granted.
|
Problem Reporting System Options:
|