Browse Source

+ tests for previous commit

git-svn-id: trunk@4958 -
Jonas Maebe 19 năm trước cách đây
mục cha
commit
de27a80cc9
3 tập tin đã thay đổi với 31 bổ sung0 xóa
  1. 2 0
      .gitattributes
  2. 14 0
      tests/test/tint2str1.pp
  3. 15 0
      tests/test/tint2str2.pp

+ 2 - 0
.gitattributes

@@ -6327,6 +6327,8 @@ tests/test/tinline3.pp svneol=native#text/plain
 tests/test/tinline4.pp svneol=native#text/plain
 tests/test/tinline5.pp -text
 tests/test/tinline6.pp svneol=native#text/plain
+tests/test/tint2str1.pp svneol=native#text/plain
+tests/test/tint2str2.pp svneol=native#text/plain
 tests/test/tint641.pp svneol=native#text/plain
 tests/test/tint642.pp svneol=native#text/plain
 tests/test/tint643.pp svneol=native#text/plain

+ 14 - 0
tests/test/tint2str1.pp

@@ -0,0 +1,14 @@
+{$mode macpas}
+
+procedure test(s: string);
+begin
+  if s <> 'abcd' then
+    halt(1);
+end;
+
+var
+  l: longint;
+begin
+  l := 'abcd';
+  test(l);
+end.

+ 15 - 0
tests/test/tint2str2.pp

@@ -0,0 +1,15 @@
+{% fail}
+
+{$mode fpc}
+
+procedure test(s: string);
+begin
+  halt(0);
+end;
+
+var
+  l: longint;
+begin
+  l := 'abcd';
+  test(l);
+end.