mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-29 00:04:55 +00:00
Estimated hours taken: 0.5 Branches: main Added a test case to ensure that stdin/out are redirected correctly when invoking a system command. tests/hard-coded/system_sort.m: Test program that just calls the system command "sort". tests/hard-coded/system_sort.inp: Some text input. tests/hard-coded/system_sort.exp: Sorted output. tests/hard-coded/Mmakefile: Added system_sort to the enabled lists.
17 lines
269 B
Mathematica
17 lines
269 B
Mathematica
% This test case is to ensure that stdin/stdout are redirected correctly for
|
|
% system commands.
|
|
|
|
:- module system_sort.
|
|
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io__state::di, io__state::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
main -->
|
|
io__call_system("sort", _).
|
|
|