From 8b7c8505b0d832aea8cf0ea7fc38f01527a84217 Mon Sep 17 00:00:00 2001 From: Chris White Date: Sun, 12 Sep 2021 22:21:01 -0400 Subject: [PATCH 1/2] plugin tests: more informative failure messages When a test fails, show the name of the key that failed as well as the value of that key. --- tests/plugin/spec/editorconfig_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/plugin/spec/editorconfig_spec.rb b/tests/plugin/spec/editorconfig_spec.rb index 0b3e654b6..fd1644b0a 100644 --- a/tests/plugin/spec/editorconfig_spec.rb +++ b/tests/plugin/spec/editorconfig_spec.rb @@ -18,7 +18,8 @@ def test_editorconfig(vim, file_name, expected_values) vim.edit(File.join(BASE_PATH, file_name)) expected_values.each do |key, val| - expect(vim.echo("&l:#{key}")).to eq(val) + vimval = vim.echo("&l:#{key}") + expect(vimval).to eq(val), "key #{key} had value #{vimval}, but I expected #{val}" end vim.command 'bd!' From 5770315c037e59f7419416e995496aa5a6f78b3a Mon Sep 17 00:00:00 2001 From: Chris White Date: Fri, 21 Jan 2022 21:35:34 -0500 Subject: [PATCH 2/2] travis-test.sh: Add usage message If $TEST_WHICH is missing, tell the user the usage. --- tests/travis-test.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/travis-test.sh b/tests/travis-test.sh index 76022a039..ef886e6bd 100755 --- a/tests/travis-test.sh +++ b/tests/travis-test.sh @@ -11,6 +11,17 @@ if [[ ( ! "${TEST_WHICH:-}" ) && "${1:-}" ]]; then export TEST_WHICH="$1" fi +if [[ ! "${TEST_WHICH:-}" ]]; then + cat <