瀏覽代碼

* test for enum case, on Jonas' request

git-svn-id: trunk@10881 -
marco 17 年之前
父節點
當前提交
046de405d1
共有 2 個文件被更改,包括 18 次插入0 次删除
  1. 1 0
      .gitattributes
  2. 17 0
      tests/webtbs/tw11176.pp

+ 1 - 0
.gitattributes

@@ -8169,6 +8169,7 @@ tests/webtbs/tw1111.pp svneol=native#text/plain
 tests/webtbs/tw11139.pp svneol=native#text/plain
 tests/webtbs/tw11169.pp svneol=native#text/plain
 tests/webtbs/tw1117.pp svneol=native#text/plain
+tests/webtbs/tw11176.pp svneol=native#text/plain
 tests/webtbs/tw11216.pp svneol=native#text/plain
 tests/webtbs/tw1122.pp svneol=native#text/plain
 tests/webtbs/tw1123.pp svneol=native#text/plain

+ 17 - 0
tests/webtbs/tw11176.pp

@@ -0,0 +1,17 @@
+type
+  Tx = (one,two,three);
+
+procedure error(number : longint);
+begin
+  writeln('error ', number);
+  halt(number);
+end;
+
+var
+  a : Tx;
+  err : word;
+
+begin
+  val('one', a, err);
+  if (err <> 0) or (a <> one) then error(1);
+end.