summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/shtypes_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools/pkglint/files/shtypes_test.go')
-rw-r--r--pkgtools/pkglint/files/shtypes_test.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/shtypes_test.go b/pkgtools/pkglint/files/shtypes_test.go
index 98b88a24238..263f459abbb 100644
--- a/pkgtools/pkglint/files/shtypes_test.go
+++ b/pkgtools/pkglint/files/shtypes_test.go
@@ -4,10 +4,18 @@ import (
check "gopkg.in/check.v1"
)
+func NewShAtom(typ ShAtomType, text string, quoting ShQuoting) *ShAtom {
+ return &ShAtom{typ, text, quoting, nil}
+}
+
+func NewShAtomVaruse(text string, quoting ShQuoting, varname string, modifiers ...string) *ShAtom {
+ return &ShAtom{shtVaruse, text, quoting, NewMkVarUse(varname, modifiers...)}
+}
+
func (s *Suite) Test_ShAtom_String(c *check.C) {
c.Check(shtComment.String(), equals, "comment")
}
func (s *Suite) Test_ShQuoting_String(c *check.C) {
- c.Check(shqUnknown.String(), equals, "unknown")
+ c.Check(shqDquotBacktSquot.String(), equals, "dbs")
}