+ test for mantis #12202

git-svn-id: trunk@11824 -
This commit is contained in:
Jonas Maebe 2008-09-26 13:32:40 +00:00
parent b2531e9883
commit edb86ee95f
2 changed files with 35 additions and 0 deletions

1
.gitattributes vendored
View File

@ -8558,6 +8558,7 @@ tests/webtbs/tw12050b.pp svneol=native#text/plain
tests/webtbs/tw12051.pp svneol=native#text/plain
tests/webtbs/tw1207.pp svneol=native#text/plain
tests/webtbs/tw12186.pp svneol=native#text/plain
tests/webtbs/tw12202.pp svneol=native#text/plain
tests/webtbs/tw12214.pp svneol=native#text/plain
tests/webtbs/tw1222.pp svneol=native#text/plain
tests/webtbs/tw1223.pp svneol=native#text/plain

34
tests/webtbs/tw12202.pp Normal file
View File

@ -0,0 +1,34 @@
program try;
procedure check(s: string);
var
i: longint;
begin
delete(s,pos(' ',s),1);
delete(s,pos('E',s),1);
delete(s,pos('.',s),1);
delete(s,pos('+',s),1);
for i := 1 to length(s) do
if (s[i]<>'0') then
halt(1);
end;
var
foo: single;
d: double;
e: extended;
s: string;
begin
foo:=0.0;
d:=0.0;
e:=0.0;
str(foo,s);
writeln(s);
check(s);
str(d,s);
writeln(s);
check(s);
str(e,s);
writeln(s);
check(s);
end.