-
Notifications
You must be signed in to change notification settings - Fork 0
/
test1.sh
43 lines (39 loc) · 835 Bytes
/
test1.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
#!/bin/bash
# 启动你的程序
# ./target/debug/client-cli 2>&1 &
# echo "开始测试"
# -- -s "127.0.0.1:8080"
{
echo -e "input args: -- -s 127.0.0.1:8080" > /dev/stderr
read -p ''
read -p $'ping'
echo -e "ping"
sleep 1
read -p $'ping 123 321'
echo -e "ping 123 321"
sleep 1
read -p $'get 1'
echo -e "get 1"
sleep 1
read -p $'set 1 123 ex 2'
echo -e "set 1 123 ex 2"
sleep 1
echo -e "get 1" > /dev/stderr
echo -e "get 1"
sleep 2
read -p $'get 1'
echo -e "get 1"
sleep 1
read -p $'set 1 114514'
echo -e "set 1 114514"
sleep 1
read -p $'get 1'
echo -e "get 1"
sleep 1
read -p $'del 1'
echo -e "del 1"
sleep 1
read -p $'get 1'
echo -e "get 1"
} | (./target/debug/client-cli )
#| ./target/debug/client-cli