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{>} !]]!"], 1, ignore, ignore) AT_CLEANUP AT_SETUP([Execute external command]) AT_CHECK([$SCITECO -e "@EC'echo -n 0123456789' Z-10\"N(0/0)'"], 0, ignore, ignore) AT_CHECK([$SCITECO -e "0,128ED @EC'echo -n 0123456789' Z-10\"N(0/0)'"], 0, ignore, ignore) AT_CLEANUP AT_BANNER([Regression Tests]) AT_SETUP([Glob patterns with character classes]) # Also checks closing brackets as part of the character set. # NOTE: The worse-than-average escaping of the square brackets with # ^EU< and ^EU> 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/*.^EUJ @S"^EM^X"'], 0, ignore, ignore) AT_XFAIL_IF(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) # On Mac OS we cannot provoke a stack overflow. AT_XFAIL_IF([case $host in *-*-darwin*) false;; esac]) AT_CLEANUP