summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2012-04-22grep-dctrl: Allow distributing atom modifiers over a parenthesed predicate.Antti-Juhani Kaijanaho3-0/+11
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-12-14Bug #652034: Handle multiple instances of the same field gracefully.Antti-Juhani Kaijanaho3-0/+22
For grep-dctrl, this means having -F search for all of the same-name fields disjunctively. The -s option selects all same-name fields for printing. For the other tools, all but the first are ignored. No string changes, so committing to maint-2.20 for release with 2.20.1. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-11-27Fix #641255: Output even a zero count (and exit successfully)Antti-Juhani Kaijanaho3-0/+13
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-11-13Partially revert fix for #525525 and add a migration path to itAntti-Juhani Kaijanaho5-5/+1
The original fix for #525525 was a cold-turkey change in behavior. This caused problems and drew objections. Here, the idea is to revert that change and add a migration path to it. An option --ensure-dctrl is added, whose states semantics is to ensure that the output format is in dctrl format. It will be ignored if -n is also given, as that deliberately asks for non-dctrl output. In practical terms, --ensure-dctrl makes the paragraph separator unconditional, as the cold turkey change (in the absence of -n). The idea is that people who prefer the new behaviour can set up shell aliases or other similar mechanisms that use --ensure-dctrl by default. Another option, --compat is added to allow people who dislike the new behaviour to make sure that they continue to receive it. A --compat option will countermand any previous --ensure-dctrl. Thus a user can put it in a shell alias, which will then continue to deliver the old semantics even after --ensure-dctrl is made default. The idea is that eventually --ensure-dctrl will become normal behaviour and the switch becomes a no-op. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-10-22Add a failing test for grep-dctrl -wAntti-Juhani Kaijanaho3-0/+16
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-10-22Add some passing testsAntti-Juhani Kaijanaho24-0/+163
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-07-28Add test for #209134Antti-Juhani Kaijanaho3-0/+8
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-07-28#525525: grep-dctrl/grep-dctrl.c: Output a stanza separator unconditionallyAntti-Juhani Kaijanaho3-0/+3
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2011-07-28Add test for #525525Antti-Juhani Kaijanaho2-0/+32329
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2010-09-11tbl-dctrl: Figure out the fields from the input if no '-c' is given.Antti-Juhani Kaijanaho3-0/+13553
Closes: #596424 reported by myself Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2010-08-28lib/paragraph.c (para_parse_next): Fix line counting.Antti-Juhani Kaijanaho8-0/+33
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2009-12-05Add support for #-commentsAntti-Juhani Kaijanaho3-0/+22
Debian Policy allows, in debian/control, lines that start with the '#'-character. Those lines are treated as comments by Policy, and ignored. This patch adds parser support for these comments in dctrl-tools. Unfortunately, it is not possible (without major changes) to ignore those comments semantically, since dctrl-tools represents paragraphs and fields as substrings of the input file. Accordingly, what this patch does is allow the parser to not choke on comments. Comments found inside a paragraph are left semantically significant (ie. part of the field body in which they are found), while comments otside of paragraphs are elided. Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2009-12-05Fix Debian bug #559543.Antti-Juhani Kaijanaho3-0/+36
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2009-08-08Fix Debian bug #511022.Antti-Juhani Kaijanaho3-0/+7
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2009-01-06New test case for bug #506138 (fails now).Antti-Juhani Kaijanaho2-0/+9
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2007-12-11grep-dctrl/grep-dctrl.c: don't display a field with an empty valueJon Bernard1-1/+0
Reported by Dan Jacobson <jidanni@jidanni.org> Signed-off-by: Jon Bernard <jbernard@debian.org>
2007-11-07Fix Debian bug #440348Antti-Juhani Kaijanaho2-0/+10
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
2007-08-05join-dctrl: new option '-a'Antti-Juhani Kaijanaho2-0/+28
With this new option, join-dctrl solves the following longstanding wishlist item. Closes: #136097 (grep-dctrl: Merging status and available would be helpful) Requested by Ben Armstrong <synrg@sanctuary.nslug.ns.ca>.
2007-04-11new program join-dctrlAntti-Juhani Kaijanaho4-0/+770
2007-04-11fix 0006 testAntti-Juhani Kaijanaho1-0/+1
2007-04-11grep-dctrl/grep-dctrl.c: fix GET_BACKUP_FIELD for (size_t)-1 on machines ↵Antti-Juhani Kaijanaho2-0/+10
where sizeof(int) != sizeof(size_t)
2007-04-08tests/0005: another simple testAntti-Juhani Kaijanaho2-0/+10163
2007-04-08grep-dctrl: new option --invert-show (-I)Antti-Juhani Kaijanaho2-0/+36
Closes: #144174 (please provide a --filter-fields option of some sort) Reported by Yann Dirson <dirson@debian.org> Merged with #264905 (show all fields except FIELD,FIELD,...) Reported by Dan Jacobson <jidanni@jidanni.org>
2007-04-08tests/0003.{sh,out}: another basic testAntti-Juhani Kaijanaho2-0/+3395
2007-04-08tests/0002.{sh,out}: new basic testAntti-Juhani Kaijanaho2-0/+83871
2007-04-08tests/bug360139.{sh,out}: new test caseAntti-Juhani Kaijanaho2-0/+46
2007-04-08begin a new test suiteAntti-Juhani Kaijanaho3-0/+83903
- Makefile: new target 'test' - tester.sh: new file - tests: new directory - tests/0001.*: new files - a simple basic test case - debian/rules: run the test suite (ignoring any failures) at build time