version 1.36, 2019/11/27 22:10:07 |
version 1.37, 2019/12/08 00:06:38 |
Line 163 func (s *Suite) Test_MkParser_MkCond(c * |
|
Line 163 func (s *Suite) Test_MkParser_MkCond(c * |
|
test("\"${VAR}str\"", |
test("\"${VAR}str\"", |
&MkCond{Term: &MkCondTerm{Str: "${VAR}str"}}) |
&MkCond{Term: &MkCondTerm{Str: "${VAR}str"}}) |
|
|
|
test("commands(show-var)", |
|
&MkCond{Call: &MkCondCall{"commands", "show-var"}}) |
|
|
|
test("exists(/usr/bin)", |
|
&MkCond{Call: &MkCondCall{"exists", "/usr/bin"}}) |
|
|
|
test("make(show-var)", |
|
&MkCond{Call: &MkCondCall{"make", "show-var"}}) |
|
|
|
test("target(do-build)", |
|
&MkCond{Call: &MkCondCall{"target", "do-build"}}) |
|
|
// Errors |
// Errors |
|
|
testRest("defined()", |
testRest("defined()", |
Line 248 func (s *Suite) Test_MkParser_MkCond(c * |
|
Line 260 func (s *Suite) Test_MkParser_MkCond(c * |
|
testRest("!empty{USE_CROSS_COMPILE:M[yY][eE][sS]}", |
testRest("!empty{USE_CROSS_COMPILE:M[yY][eE][sS]}", |
nil, |
nil, |
"empty{USE_CROSS_COMPILE:M[yY][eE][sS]}") |
"empty{USE_CROSS_COMPILE:M[yY][eE][sS]}") |
|
|
|
testRest("unknown(arg)", |
|
nil, |
|
"unknown(arg)") |
} |
} |
|
|
func (s *Suite) Test_MkParser_mkCondCompare(c *check.C) { |
func (s *Suite) Test_MkParser_mkCondCompare(c *check.C) { |