Branch: Tag:

2008-05-21

2008-05-21 15:12:18 by Martin Stjernholm <mast@lysator.liu.se>

Added a regression test for the new sscanf type checking. (This is an
example of incorrect code that still works in <= 7.6.)

Rev: src/testsuite.in:1.817

1:   START_MARKER - test_true([["$Id: testsuite.in,v 1.816 2008/05/18 14:24:59 grubba Exp $"]]); + test_true([["$Id: testsuite.in,v 1.817 2008/05/21 15:12:18 mast Exp $"]]);      // This triggered a bug only if run sufficiently early.   test_compile_any([[#pike 7.2]])
6947:   test_equal( array_sscanf("^^;|", "%[^-|]%s"), ({ "^^", ";|" }) )   test_any([[mixed a; sscanf("^^;|","%[^-|]",a); return a]],"^^")    + test_any([[ + #pike 7.6 +  int foo; +  sscanf ("11", "%s", foo); +  return foo; + ]], "11") +    // sscanf %O -------------------------------------------------------------      define(test_percent_o_raw, [[