|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0691 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 0691.
Report 0691 Actions
Problem Report Number 0691 Submitter's Classification Specification problem State Resolved Resolution Permanent Interpretation (PIN) Problem Resolution ID PIN.X.0084 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1997-07-07 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 POSIX.upe/vi 272,273,274,277 Specification Commands and Utilities Issue 4 Version 2 Location in Spec See Problem Text Problem Summary PIN4C.00030 The tests may fail on implementations that conform to POSIX 1003.2b/D11 and position the cursor at the beginning of the change. Problem Text
The tests may fail on implementations that adhere to historic practice
and position the cursor at the beginning of the change. Although
POSIX.2 interpretation #64 reaffirms the behavior, the POSIX.2b draft
reinstates the historic behavior.
The tests in question verify the following assertions:
272:
When u is entered in command mode and the reversal only affects one
line, then vi positions the cursor at the first non-blank character of
the changed line.
273:
When u is entered in command mode and the reversal represents an
addition or change, then vi positions the cursor at the first non-blank
character of the first line changed.
274:
When u is entered in command mode and more than one line is deleted and
an addition or change is not represented, then vi moves to the first
non-blank character on the line preceding the deleted text.
277:
When U is entered in command mode and the autoindent option is set,
then vi restores the line to its state before the cursor was last moved
to it and positions the cursor as indicated by the previous line's
indentation.
None of these describe the historical cursor-positioning behavior of
vi. The assertions are based on the following language for the u command
in XCU4 Issue 2, p. 799:
Undo
Synopsis: u
Reverse the last change made to the current buffer. ...
Current line: Move to the position of the first line changed, if the
reversal affects only one line or represents an addition or change;
otherwise, move to the line preceding the deleted text.
and corresponding language for the U command on p. 800:
Undo Current Line
Synopsis: U
Restore the current line to its state before the cursor was last
moved to it.
Current line: Unchanged.
Current column: Set to column position 1 or to the position indicated
by the previous line if autoindent is set.
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 cited paragraph. The response to this section
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.
The language on which the assertions were based is no longer present in
the most recent draft (Draft 11) of POSIX.2b. Rather, language
describing the historical behavior of vi (which is also the behavior of
our system) has replaced it. As can be seen in the output of the test
tests shown above, the test suite itself contains comments written to
the journal to the effect that these assertions appear to be errors and
will change. In view of this, the assertion is clearly a grey area.
Test Output
-----------------start of test output------------------
************************************************************************
/tset/POSIX.upe/vi/vi_05.ex 1 Failed
Test Information:
Assertion #272 (C): u moves to start of line
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_2'
diff of "out.stdout" and "vi_exp_2":
*** out.stdout Thu Sep 21 11:39:02 1995
--- vi_exp_2 Thu Sep 21 11:38:27 1995
***************
*** 1,5 ****
first
! se1cond
third
fourth
penultimate
--- 1,5 ----
first
! 1second
third
fourth
penultimate
************************************************************************
************************************************************************
/tset/POSIX.upe/vi/vi_05.ex 1 Failed
Test Information:
Assertion #273 (C): u moves to start of first line
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_2'
diff of "out.stdout" and "vi_exp_2":
*** out.stdout Thu Sep 21 11:39:42 1995
--- vi_exp_2 Thu Sep 21 11:39:07 1995
***************
*** 1,5 ****
first
! se1cond
third
fourth
penultimate
--- 1,5 ----
first
! 1second
third
fourth
penultimate
************************************************************************
************************************************************************
/tset/POSIX.upe/vi/vi_05.ex 1 Failed
Test Information:
Assertion #274 (C): u moves to start of first line added
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_2'
diff of "out.stdout" and "vi_exp_2":
*** out.stdout Thu Sep 21 11:40:25 1995
--- vi_exp_2 Thu Sep 21 11:39:47 1995
***************
*** 1,5 ****
first
! se1cond
third
fourth
penultimate
--- 1,5 ----
first
! 1second
third
fourth
penultimate
************************************************************************
************************************************************************
/tset/POSIX.upe/vi/vi_05.ex 1 Failed
Test Information:
Assertion #277 (C): U with autoindent set
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:42:38 1995
--- vi_exp_1 Thu Sep 21 11:41:58 1995
***************
*** 1,5 ****
first
second
! 1 third
penultimate
2last
--- 1,5 ----
first
second
! 1third
penultimate
2last
************************************************************************
------------------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
Anticipating acceptance of the completely rewritten vi specification
in POSIX 2003.2b/D11 and the eventual alignment of the tests with it
a temporary interpretation is recommended.
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:
- View Report 0691
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority