Browse Source

* check smallset+normset

pierre 23 years ago
parent
commit
5902ddb2db
1 changed files with 34 additions and 0 deletions
  1. 34 0
      tests/tbs/tb0428.pp

+ 34 - 0
tests/tbs/tb0428.pp

@@ -0,0 +1,34 @@
+{ Testing smallset + normset }
+{ with respect to normset + smallset }
+
+
+type
+  charset=set of char;
+
+  var
+     tr,tr2    : charset;
+
+
+  procedure test(const k:charset);
+
+    begin
+       tr:=[#7..#10]+k;
+       tr2:=k+[#7..#10];
+     if (tr<>tr2) then
+       begin
+         Writeln('Bug in set handling');
+         halt(1);
+       end;
+    end;
+
+  begin
+     Test([#20..#32]);
+     if not(#32 in tr) or ([#33..#255]*tr <> []) or
+        (tr<>[#7..#10,#20..#32]) or
+        (tr<>tr2) then
+       begin
+         Writeln('Bug in set handling');
+         halt(1);
+       end;
+
+  end.