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