CVSROOT: /sources/m4 Module name: m4 Changes by: Eric Blake <ericb> 06/10/31 14:14:19
Index: tests/builtins.at =================================================================== RCS file: /sources/m4/m4/tests/builtins.at,v retrieving revision 1.29 retrieving revision 1.30 diff -u -b -r1.29 -r1.30 --- tests/builtins.at 27 Oct 2006 15:16:31 -0000 1.29 +++ tests/builtins.at 31 Oct 2006 14:14:18 -0000 1.30 @@ -862,6 +862,16 @@ tmfs not fnix ]]) +dnl This used to be quadratic, taking more than 25 million comparisons, +dnl but should now operate in linear time with only several thousand checks. +AT_DATA([[in]], +[[translit(`a]m4_for([i],[1],[5000],[],[[b]])[', + `]m4_for([i],[1],[5000],[],[[a]])[b', + `c]m4_for([i],[1],[5000],[],[[d]])[') +]]) +AT_CHECK_M4([in], [0], [[c]m4_for([i],[1],[5000],[],[[d]]) +]) + AT_CLEANUP
