summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAntti-Juhani Kaijanaho <ajk@debian.org>2011-11-13 20:35:35 +0200
committerAntti-Juhani Kaijanaho <ajk@debian.org>2011-11-13 20:35:35 +0200
commit2510027ea14a15c7579b89e4c72491da1d69bef8 (patch)
tree7403f108e87ec2546b3fcc16511a3cdafc29aab7 /tests
parent788ae16ed216f79250da4e4edbf25739edf7f2f1 (diff)
downloaddctrl-tools-2510027ea14a15c7579b89e4c72491da1d69bef8.tar.gz
Partially revert fix for #525525 and add a migration path to it
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/0006.out1
-rw-r--r--tests/bug144174.out1
-rw-r--r--tests/bug209134.out1
-rw-r--r--tests/bug511022.out1
-rw-r--r--tests/bug525525.sh2
5 files changed, 1 insertions, 5 deletions
diff --git a/tests/0006.out b/tests/0006.out
index 8b13789..e69de29 100644
--- a/tests/0006.out
+++ b/tests/0006.out
@@ -1 +0,0 @@
-
diff --git a/tests/bug144174.out b/tests/bug144174.out
index 79d2dde..9638eb6 100644
--- a/tests/bug144174.out
+++ b/tests/bug144174.out
@@ -29,4 +29,3 @@ Provides: grep-dctrl
Depends: libc6 (>= 2.3.5-1)
Suggests: apt
Conflicts: grep-dctrl
-
diff --git a/tests/bug209134.out b/tests/bug209134.out
index 1cb20a2..db12b07 100644
--- a/tests/bug209134.out
+++ b/tests/bug209134.out
@@ -1,2 +1 @@
FOO: bar
-
diff --git a/tests/bug511022.out b/tests/bug511022.out
index 64edf6a..a09386a 100644
--- a/tests/bug511022.out
+++ b/tests/bug511022.out
@@ -1,2 +1 @@
gedit
-
diff --git a/tests/bug525525.sh b/tests/bug525525.sh
index a8c1380..8a5054c 100644
--- a/tests/bug525525.sh
+++ b/tests/bug525525.sh
@@ -2,4 +2,4 @@
set -e
-$GREP_DCTRL -sDescription '' < 0001.in
+$GREP_DCTRL --ensure-dctrl -sDescription '' < 0001.in