Browse Source

Merged revisions 6995,7004 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r6995 | jonas | 2007-03-25 15:34:03 +0200 (Sun, 25 Mar 2007) | 2 lines

+ added test for mantis #8187

........
r7004 | michael | 2007-03-27 00:06:12 +0200 (Tue, 27 Mar 2007) | 1 line

* LongTimeFormat should be hh:nn:ss for this test to work
........

git-svn-id: branches/fixes_2_2@7210 -

joost 18 years ago
parent
commit
8482ea4811
2 changed files with 29 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 28 0
      tests/webtbs/tw8187.pp

+ 1 - 0
.gitattributes

@@ -8045,6 +8045,7 @@ tests/webtbs/tw8172.pp svneol=native#text/plain
 tests/webtbs/tw8177.pp svneol=native#text/plain
 tests/webtbs/tw8177.pp svneol=native#text/plain
 tests/webtbs/tw8180.pp svneol=native#text/plain
 tests/webtbs/tw8180.pp svneol=native#text/plain
 tests/webtbs/tw8183.pp svneol=native#text/plain
 tests/webtbs/tw8183.pp svneol=native#text/plain
+tests/webtbs/tw8187.pp svneol=native#text/plain
 tests/webtbs/tw8199.pp svneol=native#text/plain
 tests/webtbs/tw8199.pp svneol=native#text/plain
 tests/webtbs/tw8222.pp svneol=native#text/plain
 tests/webtbs/tw8222.pp svneol=native#text/plain
 tests/webtbs/tw8222a.pp svneol=native#text/plain
 tests/webtbs/tw8222a.pp svneol=native#text/plain

+ 28 - 0
tests/webtbs/tw8187.pp

@@ -0,0 +1,28 @@
+program testtime_console;
+  
+  uses SysUtils;
+  
+Procedure Check(No : Integer; A,B : String);
+
+begin
+  if A<>B then
+    begin
+    Writeln('Test ',No,' failed: ',A,'<>',B);
+    Halt(No);
+    end;
+end;  
+  
+Procedure CheckTime;
+  
+  
+begin
+  Check(1,TimeToStr(0),'00:00:00');
+  Check(2,FormatDateTime('hh:nn:ss',StrToTime('12:00:00 AM')),'00:00:00');
+  Check(3,TimeToStr(StrToTime('12:00:00 AM')),'00:00:00');
+  Check(4,TimeToStr(StrToTime('12:35:00 PM')),'12:35:00');
+end;
+  
+begin
+  LongTimeFormat:='hh:nn:ss';
+  CheckTime;
+end.