chiark / gitweb /
test suite: gdr-import-dgitview: New test for dgit dsc imports
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 09:44:59 +0000 (10:44 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 09:45:42 +0000 (10:45 +0100)
So far this just tests the bugfixes I've just done.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
debian/tests/control
tests/tests/gdr-import-dgitview [new file with mode: 0755]

index 742b752..a64a06d 100644 (file)
@@ -7,6 +7,7 @@ dgit (6.5~) unstable; urgency=medium
   * dgit: Improve error message for unknown suite, to suggest -d.
   * git-debrebase: Properly reject bare dgit dsc imports
   * git-debrebase: Improve some error message formatting.
+  * test suite: gdr-import-dgitview: New test for dgit dsc imports.
 
  --
 
index 8f7fd7d..e3274f2 100644 (file)
@@ -16,7 +16,7 @@ Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc
 Restrictions: x-dgit-intree-only x-dgit-git-only
 
-Tests: gdr-diverge-nmu gdr-diverge-nmu-dgit gdr-edits gdr-import-dgit gdr-makepatches7 gdr-subcommands gdr-unprocessable
+Tests: gdr-diverge-nmu gdr-diverge-nmu-dgit gdr-edits gdr-import-dgit gdr-import-dgitview gdr-makepatches7 gdr-subcommands gdr-unprocessable
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, git-debrebase, git-buildpackage, faketime
 
diff --git a/tests/tests/gdr-import-dgitview b/tests/tests/gdr-import-dgitview
new file mode 100755 (executable)
index 0000000..84fc50c
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+set -e
+. tests/lib
+. $troot/lib-gdr
+
+t-dependencies GDR
+
+t-tstunt-parsechangelog
+
+t-archive example 1.0-1
+t-git-none
+
+t-dgit clone $p
+
+cd $p
+
+t-git-debrebase status
+
+t-expect-fail E:'bare dgit dsc import' \
+t-git-debrebase
+
+LC_MESSAGES=C t-git-debrebase status |tee ../bare-output
+grep 'bare dgit dsc import with no prior history' ../bare-output
+
+t-ok