tests/debug/t.interactive
raw| 1 | #!/bin/bash |
| 2 | |
| 3 | . "$XDG_TEST_DIR/include/testassertions.sh" |
| 4 | . "$XDG_TEST_DIR/include/testcontrol.sh" |
| 5 | |
| 6 | test_interactive() { |
| 7 | test_start "$FUNCNAME: verify functionality of assert_interactive" |
| 8 | |
| 9 | test_procedure |
| 10 | |
| 11 | assert_interactive "Enter 'y'" y |
| 12 | assert_interactive "Enter 'n'" n |
| 13 | assert_interactive "neg Enter 'y'" n |
| 14 | assert_interactive "neg Enter 'n'" y |
| 15 | assert_interactive "Wait" |
| 16 | |
| 17 | test_result |
| 18 | } |
| 19 | |
| 20 | run_test test_interactive |