blob: 990e79900f47dc7c25f0fe85fa643a4e0e525fd0 [file] [log] [blame]
Simon Glass129acd42014-09-14 12:40:17 -06001#!/bin/sh
2
3# Test for U-Boot cli including command repeat
4
5BASE="$(dirname $0)"
6. $BASE/common.sh
7
8run_test() {
9 ./${OUTPUT_DIR}/u-boot <<END
10setenv ctrlc_ignore y
11md 0
12
13reset
14END
15}
16check_results() {
17 echo "Check results"
18
19 grep -q 00000100 ${tmp} || fail "Command did not repeat"
20}
21
22echo "Test CLI repeat"
23echo
24tmp="$(tempfile)"
25build_uboot
26run_test >${tmp}
27check_results ${tmp}
28rm ${tmp}
29echo "Test passed"