Files
mercury/tests/invalid_nodepend/null_char.m
Zoltan Somogyi 6413b4fb08 Create invalid_nodepend and invalid_onlydepend.
tests/invalid_onlydepend:
    Move the one test case in tests/invalid for which we want to check
    the error messages generated during the generation of dependencies
    to this new test directory.

tests/invalid_nodepend:
    Move all test cases in tests/invalid which get errors during the
    generation of dependencies but for which we want to check the error
    messages generated during normal compilation to this new test directory.

tests/invalid_nodepend/Mmakefile:
tests/invalid_nodepend/Mercury.options:
tests/invalid_onlydepend/Mmakefile:
tests/invalid_onlydepend/Mercury.options:
    Versions of the same files in tests/invalid, but containing only
    the entries relevant to the moved test cases.

tests/invalid/Mmakefile:
tests/invalid/Mercury.options:
    Delete the entries that refer to the moved test cases.

tests/README:
    Document the two new test directories.

tools/bootcheck:
    Add invalid_onlydepend and invalid_nodepend to the list of
    test directories.
2021-07-28 00:59:04 +10:00

48 lines
746 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
%
% Test handling of null characters (any null character is an error).
:- module null_char.
:- interface.
:- type foo == int.
:- implementation.
:- import_module char.
:- pred 'wr\0\ng1'(int).
'wr\0\ng'(1).
:- pred wrong2(string).
wrong2("wr\0\ng").
:- pred wrong3(string).
wrong3(_String) :-'wr\0\ng'.
:- pred wrong4(char).
wrong4('\0\').
:- pred 'wr\0\ng5'.
'wr\0\ng5'.
% wrong6 used to have a raw NUL byte.
:- pred wrong7(string).
wrong7("wr\x0\ng").
:- pred wrong8(string).
wrong8("wr\u0000ng").
% wrong9 used to have a raw NUL byte.