From 307d1fcf7178b8d3b861c4510c5412a45dce7407 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Sat, 31 Jul 2021 14:50:50 +0300 Subject: [PATCH] Increase code coverage --- recipe/recipe_test.go | 12 ++++++++++++ testdata/test1.recipe | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/recipe/recipe_test.go b/recipe/recipe_test.go index ad93b8eb..abe9ed45 100644 --- a/recipe/recipe_test.go +++ b/recipe/recipe_test.go @@ -296,4 +296,16 @@ func (s *RecipeSuite) TestAux(c *C) { c.Assert(k.HasProp("TEST"), Equals, true) } +func (s *RecipeSuite) TestTags(c *C) { + r, k := &Recipe{}, &Command{} + r.AddCommand(k, "teardown") + + c.Assert(r.HasTeardown(), Equals, true) + + r, k = &Recipe{}, &Command{} + r.AddCommand(k, "") + + c.Assert(r.HasTeardown(), Equals, false) +} + // ////////////////////////////////////////////////////////////////////////////////// // diff --git a/testdata/test1.recipe b/testdata/test1.recipe index fd4b37c2..77ec9ea9 100644 --- a/testdata/test1.recipe +++ b/testdata/test1.recipe @@ -18,4 +18,4 @@ command "{user}:echo" "Simple echo command" exit 1 command:special "echo" "Simple echo command" - exit 1 \ No newline at end of file + exit 1