mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 20:03:44 +00:00
tests/hard_coded/special_char.m:
tests/hard_coded/special_char.exp2:
Add an additional expected output for systems that use
CRLF line endings.
31 lines
952 B
Mathematica
31 lines
952 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% Test output of special characters such as \r
|
|
%
|
|
% The .exp file is for systems that use "\n" as the end of line.
|
|
% The .exp2 file is for system that use "\r\n" as the end of line.
|
|
% (While we we do compare the test outputs using diff --strip-trailing-cr,
|
|
% diff gets confused in this case because we output additional carriage
|
|
% returns.)
|
|
%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module special_char.
|
|
:- interface.
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
main(!IO) :-
|
|
io.print("Hello world\r\n", !IO),
|
|
io.print("\r\n", !IO),
|
|
io.print("\a\b\v\f\t\n", !IO),
|
|
io.print("\077\", !IO),
|
|
io.print("\0123\", !IO),
|
|
io.print("\0321\", !IO),
|
|
io.print("\n", !IO).
|