-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtest.sh
executable file
·46 lines (33 loc) · 880 Bytes
/
test.sh
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
#!/bin/bash
set -e -u
export HOME=/nonexistent
export XDG_CONFIG_HOME=/nonexistent
echo Normal mode
$BUILD_DIR/src/xcowsay Hello World
echo Left bubble
$BUILD_DIR/src/xcowsay --left Hello World
echo Thought bubble
$BUILD_DIR/src/xcowsay --think Hello World
echo Left thought bubble
$BUILD_DIR/src/xcowsay --think Hello World --left
echo Fractional time
$BUILD_DIR/src/xcowsay Very quick message -t 0.5
echo Dream
$BUILD_DIR/src/xcowsay --dream $SRC_DIR/cow_small.png -t 2
echo Unicode and Pango attributes
$BUILD_DIR/src/xcowsay "<b>你好</b> <i>world</i>"
echo Right-to-left text
$BUILD_DIR/src/xcowsay <<EOF
Najib said "السلام عليكم" to me.
EOF
echo Daemon mode
$BUILD_DIR/src/xcowsay --daemon --debug &
code=$?
pid=$!
echo "PID is $pid; code is $?"
sleep 0.5
$BUILD_DIR/src/xcowsay Hello World -t 100
echo "Sleep for one second"
sleep 1
kill $pid
wait