AT_INIT AT_COLOR_TESTS # NOTE: There is currently no way to influence the return # code of SciTECO, except to provoke an error. # Since errors cannot be yielded explicitly, we use the # idiom "(0/0)" to enforce a "Division by zero" error # whenever we want to fail. AT_BANNER([Features]) AT_SETUP([Missing left operand]) AT_CHECK([$SCITECO -e '+23='], 1, ignore, ignore) AT_CLEANUP AT_SETUP([Closing loops at the correct macro level]) AT_CHECK([$SCITECO -e '@^Ua{>} is necessary here since it is the current M4 # quotation character and must be balanced: AT_CHECK([$SCITECO -e "91U< 93U> :@EN/*.^EU<^EU>ch^EU>/foo.h/\"F(0/0)'"], 0, ignore, ignore) AT_CLEANUP AT_SETUP([Glob patterns with unclosed trailing brackets]) AT_CHECK([$SCITECO -e "91U< :@EN/*.^EU= 128 (at least on Linux). AT_CHECK([$SCITECO -e "-2147483648@S/foo/"], 1, ignore, ignore) AT_CLEANUP AT_SETUP([Memory limiting during spawning]) # This might result in an OOM if memory limiting is not working AT_CHECK([$SCITECO -e "50*1000*1000,2EJ @EC'cat /dev/zero'"], 1, ignore, ignore) AT_CLEANUP AT_BANNER([Known Bugs]) AT_SETUP([Pattern matching overflow]) # Should no longer dump core. # It could fail because the memory limit is exceeed, # but not in this case since the match string isn't too large. AT_CHECK([$SCITECO -e '100000<@I"X">J @S"^EM^X"'], 0, ignore, ignore) AT_XFAIL_IF([/bin/true]) AT_CLEANUP AT_SETUP([Recursion overflow]) # Should no longer dump core. # It could fail because the memory limit is exceeed, # but not in this case since we limit the recursion. AT_CHECK([$SCITECO -e "@^Um{U.a Q.a-100000\"<%.aMm'} 0Mm"], 0, ignore, ignore) AT_XFAIL_IF([/bin/true]) AT_CLEANUP