From a64afd7f1a92a55572d3d63d2c45ab86da6a51b0 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 19 May 2018 09:59:06 +1000 Subject: [PATCH] test/run: Support a "ui-in" file containing json-rpc messages With this "ui-in", tests can execute json-rpc commands from the UI at startup to set a specific UI state. --- test/run | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/run b/test/run index e6bc386d..9f560b20 100755 --- a/test/run +++ b/test/run @@ -54,11 +54,14 @@ main() { continue fi + ui_in="${root}/${dir}/ui-in" + [ ! -f $ui_in ] && ui_in="/dev/tty" + number_tests=$(($number_tests + 1)) touch in; cp in out session="kak-tests" rm -f $tmpdir/kakoune/$USER/$session - $root/../src/kak out -n -s "$session" -ui json -e "$kak_commands" > ui-out + $root/../src/kak out -n -s "$session" -ui json -e "$kak_commands" > ui-out < "${ui_in}" retval=$? failed=0 if [ ! -e error ]; then # failure not expected