Home | History | Annotate | Download | only in testdata
      1 # These test special (mostly error) UTF features of DFA matching. They are a 
      2 # selection of the more comprehensive tests that are run for non-DFA matching.
      3 # The output is different for the different widths.
      4 
      5 #subject dfa
      6 
      7 /X/utf
      8     XX\x{d800}
      9 Failed: error -16: UTF-8 error: code points 0xd800-0xdfff are not defined at offset 2
     10     XX\x{d800}\=offset=3
     11 Error -36 (bad UTF-8 offset)
     12     XX\x{d800}\=no_utf_check
     13  0: X
     14     XX\x{da00}
     15 Failed: error -16: UTF-8 error: code points 0xd800-0xdfff are not defined at offset 2
     16     XX\x{da00}\=no_utf_check
     17  0: X
     18     XX\x{dc00}
     19 Failed: error -16: UTF-8 error: code points 0xd800-0xdfff are not defined at offset 2
     20     XX\x{dc00}\=no_utf_check
     21  0: X
     22     XX\x{de00}
     23 Failed: error -16: UTF-8 error: code points 0xd800-0xdfff are not defined at offset 2
     24     XX\x{de00}\=no_utf_check
     25  0: X
     26     XX\x{dfff}
     27 Failed: error -16: UTF-8 error: code points 0xd800-0xdfff are not defined at offset 2
     28     XX\x{dfff}\=no_utf_check
     29  0: X
     30     XX\x{110000}
     31 Failed: error -15: UTF-8 error: code points greater than 0x10ffff are not defined at offset 2
     32     XX\x{d800}\x{1234}
     33 Failed: error -16: UTF-8 error: code points 0xd800-0xdfff are not defined at offset 2
     34           
     35 /badutf/utf
     36     X\xdf
     37 Failed: error -3: UTF-8 error: 1 byte missing at end at offset 1
     38     XX\xef
     39 Failed: error -4: UTF-8 error: 2 bytes missing at end at offset 2
     40     XXX\xef\x80
     41 Failed: error -3: UTF-8 error: 1 byte missing at end at offset 3
     42     X\xf7
     43 Failed: error -5: UTF-8 error: 3 bytes missing at end at offset 1
     44     XX\xf7\x80
     45 Failed: error -4: UTF-8 error: 2 bytes missing at end at offset 2
     46     XXX\xf7\x80\x80
     47 Failed: error -3: UTF-8 error: 1 byte missing at end at offset 3
     48 
     49 /shortutf/utf
     50     XX\xdf\=ph
     51 Failed: error -3: UTF-8 error: 1 byte missing at end at offset 2
     52     XX\xef\=ph
     53 Failed: error -4: UTF-8 error: 2 bytes missing at end at offset 2
     54     XX\xef\x80\=ph
     55 Failed: error -3: UTF-8 error: 1 byte missing at end at offset 2
     56     \xf7\=ph
     57 Failed: error -5: UTF-8 error: 3 bytes missing at end at offset 0
     58     \xf7\x80\=ph
     59 Failed: error -4: UTF-8 error: 2 bytes missing at end at offset 0
     60 
     61 # End of testinput14
     62