* test val input

git-svn-id: trunk@7123 -
This commit is contained in:
pierre 2007-04-17 15:39:28 +00:00
parent 0b8e1aa0b4
commit 02d329cf4f
2 changed files with 31 additions and 0 deletions

1
.gitattributes vendored
View File

@ -8126,6 +8126,7 @@ tests/webtbs/tw8156.pp svneol=native#text/plain
tests/webtbs/tw8171.pp svneol=native#text/plain
tests/webtbs/tw8172.pp svneol=native#text/plain
tests/webtbs/tw8177.pp svneol=native#text/plain
tests/webtbs/tw8177a.pp -text
tests/webtbs/tw8180.pp svneol=native#text/plain
tests/webtbs/tw8183.pp svneol=native#text/plain
tests/webtbs/tw8187.pp svneol=native#text/plain

30
tests/webtbs/tw8177a.pp Normal file
View File

@ -0,0 +1,30 @@
var
S : string;
i : longint;
err : word;
begin
S:='';
val(S,i,err);
if err=0 then
begin
Writeln('Error: empty string is a valid input for val function');
Halt(1);
end
else
begin
Writeln('Correct: empty string is a not valid input for val function');
end;
S:=#0;
val(S,i,err);
if err=0 then
begin
Writeln('Error: #0 string is a valid input for val function');
Halt(1);
end
else
begin
Writeln('Correct: #0 string is a not valid input for val function');
end;
end.