Browse Source

+ added test for mantis #8187

git-svn-id: trunk@6995 -
Jonas Maebe 18 years ago
parent
commit
aef82063ec
2 changed files with 28 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 27 0
      tests/webtbs/tw8187.pp

+ 1 - 0
.gitattributes

@@ -8107,6 +8107,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

+ 27 - 0
tests/webtbs/tw8187.pp

@@ -0,0 +1,27 @@
+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
+  CheckTime;
+end.