summaryrefslogtreecommitdiff
path: root/test/cmd_repeat.sh
blob: 990e79900f47dc7c25f0fe85fa643a4e0e525fd0 (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
#!/bin/sh

# Test for U-Boot cli including command repeat

BASE="$(dirname $0)"
. $BASE/common.sh

run_test() {
	./${OUTPUT_DIR}/u-boot <<END
setenv ctrlc_ignore y
md 0

reset
END
}
check_results() {
	echo "Check results"

	grep -q 00000100 ${tmp} || fail "Command did not repeat"
}

echo "Test CLI repeat"
echo
tmp="$(tempfile)"
build_uboot
run_test >${tmp}
check_results ${tmp}
rm ${tmp}
echo "Test passed"