From 476561fb8768f592d10aa5f1a6c3a68cf82a6709 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 18 Jul 2015 15:48:35 -0400 Subject: [PATCH] Test: Added _config tests --- test/configuration.t | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/configuration.t b/test/configuration.t index e939ebdd2..9c3febb82 100755 --- a/test/configuration.t +++ b/test/configuration.t @@ -57,6 +57,21 @@ class TestConfiguration(TestCase): self.assertIn("unrecognized variables", out) self.assertIn(" foo\n", out) + def test_config_completion(self): + """verify that the '_config' command generates a full list""" + code, out, err = self.t("_config") + self.assertIn("_forcecolor", out) # first + self.assertIn("xterm.title", out) # last + + def test_config_nothing(self): + """Verify error handling with no args""" + code, out, err = self.t.runError("config") + self.assertIn("Specify the name of a config variable to modify.", err) + + def test_config_no_change(self): + """Verify error handling with no change""" + code, out, err = self.t.runError("config foo") + self.assertIn("No entry named 'foo' found.", err) if __name__ == "__main__": from simpletap import TAPTestRunner