|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0639 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0639.
Report 0639 Actions
Problem Report Number 0639 Submitter's Classification Specification problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0243 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published null Product Standard Commands and Utilities V2 (UNIX 95) Certification Program The Open Brand certification program Test Suite VSC version 4.1.4 Test Identification POSIX.upe/vi 247,250 Problem Summary PG4C.00033 This was refused because it is a duplicate. Use TIN4C.00016 instead. Problem Text
The tests may fail on implementations that adhere to historic practice
and place the cursor to the first character put back. Although
POSIX.2 interpretation #64 reaffirms the behavior, the POSIX.2b draft
reinstates the historic behavior.
The tests in question verify the assertions:
When p is entered in the command mode and the unnamed buffer
does not contain complete lines, then vi inserts text from the
unnamed buffer after the current cursor position and positions
the cursor to the last character of the inserted text.
and
When P is entered in the command mode and the unnamed buffer
does not contain complete lines, then vi inserts text from the
unnamed buffer before the current cursor position and positions
the cursor to the last character of the inserted text.
This is not the historical behavior of vi. The first assertion is based on
the following language in XCU4 Issue 2, p. 797:
Synopsis: [buffer] p
Insert text from buffer <buffer> following the current column or
current line, as described for the P command. If <buffer> is
omitted, the unnamed buffer is used.
Current line: (Current line +1) if the buffer contains whole
lines; otherwise unchanged.
Current column: First non-blank character of the inserted text
if the buffer contained whole lines; otherwise, the last character
of the inserted text.
and the second assertion on the following language from the same page
of XCU4 Issue 2:
Synopsis: [buffer] P
Put the last deleted text back before and above the cursor. The
text will go back as whole lines above the cursor if it was deleted
as whole lines. Otherwise, the text will be inserted just before
the cursor.
The command can be preceded by a named buffer specification ("x),
to retrieve the contents of the buffer.
Current line: Unchanged.
Current column: Move to the last column position of the inserted
characters. If the buffer containes whole lines the current column
will be the first non-blank character of the inserted characters.
This language is taken directly from POSIX.2. However, IEEE
interpretation pasc-1003.2-064 addresses a large number of issues
regarding vi and ex, including this one. This interpretation request
is too long to cite here in its entirety, but it states in part:
#68 vi Command Descriptions
Section 5.35.7.1, page 629, line 4903
General reworking, trying to get the discussion of the current
line and column to work. The major change is that the current
specification doesn't handle characters that take up more than
a single screen column. The intent of this fix is to require
that the current column be a screen column where some part of
the correct character is displayed, and then rely on the
adjustment rules to get it on the exact correct column.
Historically, each time the window is redrawn, only the window
option number of lines are displayed.
Historically, the window option could not be set to any value
larger than LINES - 1.
This change should include the deletion of the paragraph on
page 632, lines 5051-5058, and adding appropriate wording to
the paragraphs on page 629, around lines 4903. The fact that
the current line has changed, and the screen is required to
display the current line should cause the update to happen.
This change should include the deletion of the paragraph on
page 632, lines 5059-5078, and adding appropriate wording to
the paragraphs on page 629, around lines 4903. More
specifically, as noted in Request for Interpretation #64(43),
this has to be specified on a command-by-command basis,
there simply aren't any general rules.
This change also includes a large number of changes, which
are NOT individually identified, throughout the standard, for
the Current line/column lines.
Note particularly the last paragraph. The response to this portion of
the interpretation request was:
#68:
The standard states the behavior for lines and columns in vi, and
conforming implementations must conform to this. However, concerns
have been raised about this which are being referred to the sponsor.
Note also that the language on which the assertions were based is no
longer present in the most recent draft of POSIX.2b, and that the test
suite itself contains a comment written to the journal to the effect
that this appears to be an error and will change. In fact, POSIX.2b
describes the behavior of the p and P commands in much greater detail,
in order to conform to historic practice (which differed depending on
whether or not the lines in the buffer were whole or partial lines from
the original file). The behavior of our implementation conforms to the
POSIX.2b specification. In particular, the behavior invoked by the
test in VSC4.1.4A vi assertion 247 should be the following, quoted from
the current draft (Draft 11, May 1995) of POSIX.2b:
Current Column:
...
If the buffer text is in character mode:
1. If the text in the buffer is from more than a single line,
then set to the last column on which any portion of the
first character from the buffer is displayed.
This is the behavior of our implementation. Similar changes have been
made to the specification of the P command. In view of this, the
assertion is clearly a grey area.
Test Output
-----------------start of test output------------------
************************************************************************
/tset/POSIX.upe/vi/vi_04.ex 1 Failed
Test Information:
Assertion #247 (C): p command on parts of lines
Note: The behavior associated with this assertion is expected
to change in a future revision of POSIX.2.
Standard output isn't the same as file 'vi_exp_1'
diff of "out.stdout" and "vi_exp_1":
*** out.stdout Thu Sep 21 11:17:25 1995
--- vi_exp_1 Thu Sep 21 11:16:47 1995
***************
*** 1,5 ****
fcon1irst
second line
third or penult line
! ll2ine
! third or ast one
--- 1,5 ----
fcon1irst
second line
third or penult line
! lline
! third or 2ast one
************************************************************************
************************************************************************
/tset/POSIX.upe/vi/vi_04.ex 1 Failed
Test Information:
Assertion #250 (C): P command on parts of lines
Note: The behavior associated with this assertion is expected
to change in a future revision of POSIX.2.
Standard output isn't the same as file 'vi_exp_1'
diff of "out.stdout" and "vi_exp_1":
*** out.stdout Thu Sep 21 11:19:31 1995
--- vi_exp_1 Thu Sep 21 11:18:52 1995
***************
*** 1,5 ****
con1first
second line
third or penult line
! l2ine
! third or last one
--- 1,5 ----
con1first
second line
third or penult line
! line
! third or 2last one
************************************************************************
------------------end of test output-------------------
Note: this output was from the vrpt report.
Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We recommend this request be refused.
This is the same as TIN4C.00016.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused.
Problem Reporting System Options:
- View Report 0639
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority