]> git.draconx.ca Git - cdecl99.git/blobdiff - tests/stress.at
libcdecl: Fix parsing of very long parameter lists.
[cdecl99.git] / tests / stress.at
index 605a69ac27b6c3ebe2f047130df5476fa2c90003..3ee72d931c7cae04f8b9581fa5c0f7b5f81666d0 100644 (file)
@@ -135,6 +135,14 @@ AT_DATA([check.awk],
 BEGIN { FS = "@"; runstart = 0; }
 END { finish_run(NR); }
 
+gsub(/,[^,)]*/, "~") {
+  while (match($0, /~+/) > 0) {
+    l = substr($0, 1, RSTART-1);
+    r = substr($0, RSTART+RLENGTH);
+    $0 = l ", [plus " RLENGTH " more parameters]" r;
+  }
+}
+
 $0 != lastline {
   finish_run(NR-1);
   lastline = $0;
@@ -156,6 +164,8 @@ done
 
 cat >test.dat <<EOF
 explain int $a
+explain int ($a)
+type function ($a) returning int
 EOF
 
 AT_CHECK([cdecl99 -f test.dat >test.out; status=$?;
@@ -163,6 +173,8 @@ $AWK -f check.awk test.out
 exit $status], [0],
 [[declare a as int
 [repeated 16383 more times]
+type function (a, [plus 16383 more parameters]) returning int
+int (a, [plus 16383 more parameters])
 ]])
 
 AT_CLEANUP