blob: acd172817a35483cf5fc5b06a3210ca1a9215df6 (
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
|
/*
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;
start:
"make" -> (LIST (COMMAND (STRING make)))
"make && make modules_install;" -> (LIST (&& (COMMAND (STRING make)) (COMMAND (STRING make) (STRING modules_install))))
"make && make modules_install &" -> (LIST (&& (COMMAND (STRING make)) (COMMAND (STRING make) (STRING modules_install))))
"cd /usr/bin; ls -al |grep more&& cp ./less ./more" -> (LIST (COMMAND (STRING cd) (STRING / usr / bin)) (&& (| (COMMAND (STRING ls) (STRING - al)) (COMMAND (STRING grep) (STRING more))) (COMMAND (STRING cp) (STRING . / less) (STRING . / more))))
"mkdir test
cd test
cp ../asdf.tar.gz .
tar xpf asdf.tar.gz" -> (LIST (COMMAND (STRING mkdir) (STRING test)) (COMMAND (STRING cd) (STRING test)) (COMMAND (STRING cp) (STRING .. / asdf . tar . gz) (STRING .)) (COMMAND (STRING tar) (STRING xpf) (STRING asdf . tar . gz)))
"mkdir build && cd build
./configure && make" -> (LIST (&& (COMMAND (STRING mkdir) (STRING build)) (COMMAND (STRING cd) (STRING build))) (&& (COMMAND (STRING . / configure)) (COMMAND (STRING make))))
"make;make modules_install
cp arch/x86_64/boot/bzImage /boot/kernel" -> (LIST (COMMAND (STRING make)) (COMMAND (STRING make) (STRING modules_install)) (COMMAND (STRING cp) (STRING arch / x86_64 / boot / bzImage) (STRING / boot / kernel)))
"a=asdf
b=three
echo \"a b\"" -> (LIST (COMMAND (VARIABLE_DEFINITIONS (= a (STRING asdf)))) (COMMAND (VARIABLE_DEFINITIONS (= b (STRING three)))) (COMMAND (STRING echo) (STRING (DOUBLE_QUOTED_STRING a b))))
"echo one && (echo two || echo three)" -> (LIST (&& (COMMAND (STRING echo) (STRING one)) (COMMAND (SUBSHELL (LIST (|| (COMMAND (STRING echo) (STRING two)) (COMMAND (STRING echo) (STRING three))))))))
"FOO='bar' ;" -> (LIST (COMMAND (VARIABLE_DEFINITIONS (= FOO (STRING (SINGLE_QUOTED_STRING 'bar'))))))
"true;
true" -> (LIST (COMMAND (STRING true)) (COMMAND (STRING true)))
"(echo hi > /dev/null) >> 1" -> (LIST (COMMAND (REDIR >> (FILE_DESCRIPTOR 1)) (SUBSHELL (LIST (COMMAND (REDIR > (STRING / dev / null)) (STRING echo) (STRING hi))))))
"{ echo hi > /dev/null; } >> 1" -> (LIST (COMMAND (REDIR >> (FILE_DESCRIPTOR 1)) (CURRENT_SHELL (LIST (COMMAND (REDIR > (STRING / dev / null)) (STRING echo) (STRING hi))))))
"test 1 -gt 0 || return 0" -> (LIST (|| (COMMAND (COMPOUND_COND (BUILTIN_TEST (gt (STRING 1) (STRING 0))))) (COMMAND (STRING return) (STRING 0))))
|