Add test for five escapes before n

pull/2698/head
Joergen Ibsen 7 years ago committed by Jussi Pakkanen
parent b9a0589067
commit dad5779d3c
  1. 3
      test cases/common/42 string operations/meson.build

@ -83,6 +83,8 @@ bs_n = '''\n'''
bs_nl = '''\ bs_nl = '''\
''' '''
bs_bs_n = '''\\n''' bs_bs_n = '''\\n'''
bs_bs_nl = '''\\
'''
assert('\b' == bs_b, 'Single backslash broken') assert('\b' == bs_b, 'Single backslash broken')
assert('\\b' == bs_b, 'Double backslash broken') assert('\\b' == bs_b, 'Double backslash broken')
@ -92,3 +94,4 @@ assert('\n' == nl, 'Newline escape broken')
assert('\\n' == bs_n, 'Double backslash broken before n') assert('\\n' == bs_n, 'Double backslash broken before n')
assert('\\\n' == bs_nl, 'Three backslash broken before n') assert('\\\n' == bs_nl, 'Three backslash broken before n')
assert('\\\\n' == bs_bs_n, 'Four backslash broken before n') assert('\\\\n' == bs_bs_n, 'Four backslash broken before n')
assert('\\\\\n' == bs_bs_nl, 'Five backslash broken before n')

Loading…
Cancel
Save