blob: bd4cdd910b036f695bfee411f7e9d93f177a9465 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
Please use git log for copyright holder and year information
This file is part of libbash.
libbash is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
libbash is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with libbash. If not, see <http://www.gnu.org/licenses/>.
*/
gunit java_libbash;
redirection:
">output_file" -> (REDIR > (STRING output_file))
" 1>output.file" -> (REDIR 1 > (STRING output . file))
" 2>&1" -> (REDIR 2 >& (FILE_DESCRIPTOR 1))
" 2>&1-" -> (REDIR 2 >& (FILE_DESCRIPTOR_MOVE 1))
">> /this/is/append" -> (REDIR >> (STRING / this / is / append))
"&> allout" -> (REDIR &> (STRING allout))
"< this.is.1input" -> (REDIR < (STRING this . is . 1 input))
" 3< \"input from file\"" -> (REDIR 3 < (STRING (DOUBLE_QUOTED_STRING input from file)))
" 2<&0" -> (REDIR 2 <& (FILE_DESCRIPTOR 0))
"<<<\"#include <pthread.h>\" >& /dev/null" -> (<<< (STRING (DOUBLE_QUOTED_STRING # include < pthread . h >))) (REDIR >& (STRING / dev / null))
here_string:
"<<< herestring" -> (<<< (STRING herestring))
start:
"cat<<- asdf
asdf
" -> (LIST (COMMAND (STRING cat) (<<- STRING)))
"cat<< blue
red
green
" FAIL
"cat << _EOF_.abc >/dev/null
blah
blah
_EOF_.abc
" -> (LIST (COMMAND (STRING cat) (<< (STRING blah
blah
) (REDIR > (STRING / dev / null)))))
"cat > /dev/null <<-END_LDSCRIPT
GNU...
END_LDSCRIPT" -> (LIST (COMMAND (REDIR > (STRING / dev / null)) (STRING cat) (<<- (STRING GNU .. .
))))
|