From c54c8c05bf56fb01c1d9aa9760d8a9bec394e911 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 9 Jun 2017 10:55:17 +0100 Subject: [PATCH] Add horizontal/vertical scrolling display tests --- test/display/horizontal-scroll/cmd | 1 + test/display/horizontal-scroll/display | 6 ++++++ test/display/horizontal-scroll/in | 2 ++ test/display/vertical-scroll/cmd | 1 + test/display/vertical-scroll/display | 6 ++++++ test/display/vertical-scroll/in | 30 ++++++++++++++++++++++++++ 6 files changed, 46 insertions(+) create mode 100644 test/display/horizontal-scroll/cmd create mode 100644 test/display/horizontal-scroll/display create mode 100644 test/display/horizontal-scroll/in create mode 100644 test/display/vertical-scroll/cmd create mode 100644 test/display/vertical-scroll/display create mode 100644 test/display/vertical-scroll/in diff --git a/test/display/horizontal-scroll/cmd b/test/display/horizontal-scroll/cmd new file mode 100644 index 00000000..f13d7ddb --- /dev/null +++ b/test/display/horizontal-scroll/cmd @@ -0,0 +1 @@ +gl diff --git a/test/display/horizontal-scroll/display b/test/display/horizontal-scroll/display new file mode 100644 index 00000000..b84e3176 --- /dev/null +++ b/test/display/horizontal-scroll/display @@ -0,0 +1,6 @@ +{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, { "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": "x" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "xxxxxxxxxx\u000a" }]], { "fg": "default", "bg": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "attributes": [] }] } +{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] } +{ "jsonrpc": "2.0", "method": "info_hide", "params": [] } +{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "out 1:90 " }, { "face": { "fg": "black", "bg": "yellow", "attributes": [] }, "contents": "" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "1 sel" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " - unnamed0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "attributes": [] }] } +{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 0, "column": 79 }] } +{ "jsonrpc": "2.0", "method": "refresh", "params": [true] } diff --git a/test/display/horizontal-scroll/in b/test/display/horizontal-scroll/in new file mode 100644 index 00000000..5ec598fd --- /dev/null +++ b/test/display/horizontal-scroll/in @@ -0,0 +1,2 @@ +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +xxxxxxxxxxxxxxxxxxxx diff --git a/test/display/vertical-scroll/cmd b/test/display/vertical-scroll/cmd new file mode 100644 index 00000000..502a6516 --- /dev/null +++ b/test/display/vertical-scroll/cmd @@ -0,0 +1 @@ +gj diff --git a/test/display/vertical-scroll/display b/test/display/vertical-scroll/display new file mode 100644 index 00000000..c30a8b9d --- /dev/null +++ b/test/display/vertical-scroll/display @@ -0,0 +1,6 @@ +{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "07\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "08\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "09\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "10\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "11\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "12\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "13\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "14\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "15\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "16\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "17\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "18\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "19\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "20\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "21\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "22\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "23\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "24\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "25\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "26\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "27\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "28\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "29\u000a" }], [{ "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": "3" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "0\u000a" }]], { "fg": "default", "bg": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "attributes": [] }] } +{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] } +{ "jsonrpc": "2.0", "method": "info_hide", "params": [] } +{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "out 30:1 " }, { "face": { "fg": "black", "bg": "yellow", "attributes": [] }, "contents": "" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "1 sel" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " - unnamed0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "attributes": [] }] } +{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 23, "column": 0 }] } +{ "jsonrpc": "2.0", "method": "refresh", "params": [true] } diff --git a/test/display/vertical-scroll/in b/test/display/vertical-scroll/in new file mode 100644 index 00000000..023f1d8d --- /dev/null +++ b/test/display/vertical-scroll/in @@ -0,0 +1,30 @@ +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30