-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests
125 lines (114 loc) · 2.54 KB
/
tests
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
[901]
NAME="Nothing"
SETUP="export TERM=xterm ; PATH='/bin:/usr/bin'"
CLEAN=""
TESTS=
echo ''
[901-END]
[902]
NAME="Exec two command"
SETUP="export TERM=xterm ; PATH='/bin:/usr/bin'"
CLEAN=""
TESTS=
echo 'ls /etc'
echo 'cat /etc/resolv.conf'
[902-END]
[903]
NAME="Testing with /usr/bin PATH"
SETUP="export TERM=xterm ; PATH='/usr/bin'"
CLEAN=""
TESTS=
echo 'pwd'
[903-END]
[904]
NAME="Testing with /bin PATH"
SETUP="export TERM=xterm ; PATH='/bin'"
CLEAN=""
TESTS=
echo 'pwd'
[904-END]
[905]
NAME="run commands"
SETUP="export TERM=xterm ; PATH='/bin:/usr/bin'"
CLEAN=""
TESTS=
echo 'cat /etc/resolv.conf'
sleep 0.5
echo 'ls -l /etc'
sleep 0.5
echo 'pwd'
[905-END]
[906]
NAME="setenv and unsetenv"
SETUP="/usr/bin/env > .lstenv ; while read varenv ; do unset $varenv ; done < <(/bin/cat .lstenv | /usr/bin/cut -f1 -d=) ; export PATH=/bin:/usr/bin ; export _=ls ; export LS_COLORS=RID ; export MYBG=4 ; export LVL=4 ; export NOTE=2"
CLEAN="while read varenv ; do export "$varenv" 2>/dev/null ; done < <(/bin/cat .lstenv) ; /bin/rm -f .lstenv"
TESTS=
echo 'unsetenv HOSTTYPE'
echo 'unsetenv VENDOR'
echo 'unsetenv OSTYPE'
echo 'unsetenv MACHTYPE'
echo 'unsetenv SHLVL'
echo 'unsetenv PWD'
echo 'unsetenv LOGNAME'
echo 'unsetenv USER'
echo 'unsetenv GROUP'
echo 'unsetenv HOST'
echo 'unsetenv REMOTEHOST'
echo 'unsetenv _'
echo 'unsetenv LS_COLORS'
echo 'unsetenv NOTE'
echo 'setenv titi'
echo 'setenv tata coucou'
echo 'env'
echo '/usr/bin/env'
echo 'setenv var1 val1'
echo 'setenv var2 val2'
[906-END]
[907]
NAME="builtin cd"
SETUP="export TERM=xterm ; PATH='/bin:/usr/bin'"
CLEAN=""
TESTS=
echo 'cd ..'
echo 'ls -l'
echo 'cd /usr'
echo 'ls -l'
[907-END]
[908]
NAME="many tab and space"
SETUP="export TERM=xterm ; PATH='/bin:/usr/bin'"
CLEAN=""
TESTS=
echo -e "\t\t ls\t \t-l \t\t \t -a /usr \t\t"
[908-END]
[909]
NAME="Launch DivZero program with core dump"
SETUP="export TERM=xterm ; PATH='/bin:/usr/bin'"
CLEAN=""
TESTS=
echo "./my_divzero"
[909-END]
[910]
NAME="Launch SegFault program without core dump"
SETUP="ulimit -c 0 ; export TERM=xterm ; PATH='/bin:/usr/bin'"
CLEAN=""
TESTS=
echo "./my_segfault"
[910-END]
[911]
NAME="Testing simple pipe"
SETUP="export TERM=xterm ; PATH='/bin:/usr/bin'"
CLEAN=""
TESTS=
echo "ls -l /etc | grep sh"
[911-END]
[912]
NAME="A pipe with a builtin ?"
SETUP="export VAR1=VALEUR1 ; OLDPATH=$PATH ; PATH='/random'"
CLEAN="PATH=$OLDPATH"
TESTS=
echo 'setenv | /bin/grep VAR1'
echo '/bin/ls | cd /usr'
echo 'ls -l'
echo 'exit 45|cat /etc/resolv.conf'
[912-END]