ID Number: Q81467
1.00
WINDOWS
Summary:
When using Microsoft Test's Line Input statement to input text from a
file, all CTRL+Z characters will be read in and converted to one space
each rather than interpreted as an end of file (EOF) marker.
This is a design feature of Microsoft Test version 1.0 for Windows.
More Information:
To demonstrate this feature, do the following:
1. Create a text file (TEST.TXT) with a CTRL+Z in the first line and
text following the CTRL+Z. You can do this in Basic by opening a
file for binary and sending some text to it followed by a chr$(26)
(character code for CTRL+Z) character, followed by more text.
2. Start the MSTest driver and add the following code to Script1:
Open "Test.TXT" for input as #1
Line Input #1, Text$
Print Text$
The result is that CTRL+Z was not treated as an EOF marker, because it
has been replaced by a space and the following text was read in. This
behavior is by design. To check for embedded CTRL+Z characters, you
have to programatically check every character that is read.