From 2f35bf606db3a4b14d0f31f9180f852e14e2819f Mon Sep 17 00:00:00 2001 From: Steven Chan Date: Sat, 11 May 2019 11:24:05 -0700 Subject: [PATCH] Update tests 1. help/default-test The action name field is wider causing re-alignment of help text. 2. tigrc/parse-test Comment for a key binding is now exposed as help text. 3. help/user-command-comment-test Add a new test for defining user comments for user commands. --- test/help/default-test | 6 ++-- test/help/user-command-comment-test | 52 +++++++++++++++++++++++++++++ test/tigrc/parse-test | 2 +- 3 files changed, 56 insertions(+), 4 deletions(-) create mode 100755 test/help/user-command-comment-test diff --git a/test/help/default-test b/test/help/default-test index 4e8f9377b..b9b3519de 100755 --- a/test/help/default-test +++ b/test/help/default-test @@ -109,9 +109,9 @@ External commands: ! ?git branch -D %(branch) [-] status bindings View-specific actions - u status-update Stage/unstage chunk or file changes - ! status-revert Revert chunk or file changes - M status-merge Merge file using external tool + u status-update Stage/unstage chunk or file changes + ! status-revert Revert chunk or file changes + M status-merge Merge file using external tool External commands: C !git commit [-] stage bindings diff --git a/test/help/user-command-comment-test b/test/help/user-command-comment-test new file mode 100755 index 000000000..dedcb3360 --- /dev/null +++ b/test/help/user-command-comment-test @@ -0,0 +1,52 @@ +#!/bin/sh + +. libtest.sh + +export TIGRC_SYSTEM=does-not-exist + +test_case user-command-comment \ + --args='status' \ + --tigrc=" + bind generic : prompt # User comment for a builtin command is not exposed + bind generic , none # User comment does not interfere with a null binding + bind generic u1 !user + bind generic u2 !user # This is a user commentary for a simple user command + bind generic u3 !user 1 2 3 # This is a user commentary for a user command with parameters + bind generic u4 !user command with a long parameter list but no user commentary + " \ + --script=" + :view-help + " \ + <