summaryrefslogtreecommitdiff
path: root/usr.bin/make/unit-tests/cond1
AgeCommit message (Collapse)Author
2014-08-21Give each group of tests its own output file.apb
* Rename each sub-makefile to *.mk; * Add a *.exp file of expected output for each sub-makefile; * Remove test.exp, which is replaced by all the other *.exp files. * Use suffix rules to generate *.rawout and *.out files for each test case. * Rewrite the test and accept targets to adapt to the new way. The old (now removed) test.exp file is almost identical to the concatenation (in the correct order) of all the new *.exp files. There are expected differences in makefile names embedded in the output, and the new "exit status" lines. Some old "*** Error code 1 (ignored)" lines are also removed (replaced by new "exit status 1" lines).
2011-03-06Add unit tests to check that exists(some/dir/) workssjg
Also fix handling of sysV substitutions when lhs and variable are empty. Also that modifiers do not cause errors during conditional tests when undefined variables should otherwise be ok. Ie. .if defined(nosuch) && ${nosuch:Mx} != ""
2008-10-29If Parse_Error is called after curFile is invalid, set it to a dummysjg
to avoid seg-fault. Also the NULL filename will cause ParseVErrorInternal to skip trying to report file and line number info. If CondToken is called outside the context of a .if etc, variables in the expression being parsed will already be expanded, so allow for an unqouted number to jump us back into the compare logic. This allows ${${SomeNumber:U42} > 0:?True:False} to work anywhere. Job_Finish should process postCommands if it has commands or children.
2004-04-13Allow "string" and "${varspec}" on lhs of conditionals.sjg
This makes it possible to use expressions like ${("${LIST:Msomething"}):?present:absent} it also makes treatment of lhs and rhs more consistent, and makes CondToken easier to read. Update unit-test/cond1 to test new features.
2004-04-08Revised patch for catching extraneous .else'ssjg
We actually need to tack condTop and skipIfLevel. Bump MAXIF while here. Enhance the unit-test for conditionals to exercise more code. PR: 24420
2004-04-08Add check for extraneous .else's - based on patch from Arne H. Juulsjg
in PR/24420. Add a unit-test for conditionals. Also in the unit-test makefile strip any .CURDIR in output. PR: 24420