[DRE-commits] [ruby-gettext] 08/09: Add a patch to fix test failures when there's no stdin

Jérémy Bobbio lunar at alioth.debian.org
Sun Sep 1 17:39:36 UTC 2013


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository ruby-gettext.

commit 80a3d836b848bb75253ba6411bf7a6686be86cc4
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sun Sep 1 19:16:25 2013 +0200

    Add a patch to fix test failures when there's no stdin
---
 ...ndle-a-closed-stdin-when-prompting-in-msg.patch |   21 ++++++++++++++++++++
 debian/patches/series                              |    1 +
 2 files changed, 22 insertions(+)

diff --git a/debian/patches/0001-Properly-handle-a-closed-stdin-when-prompting-in-msg.patch b/debian/patches/0001-Properly-handle-a-closed-stdin-when-prompting-in-msg.patch
new file mode 100644
index 0000000..dfd030c
--- /dev/null
+++ b/debian/patches/0001-Properly-handle-a-closed-stdin-when-prompting-in-msg.patch
@@ -0,0 +1,21 @@
+From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar at debian.org>
+Date: Sun, 1 Sep 2013 19:15:42 +0200
+Subject: Properly handle a closed stdin when prompting in msginit
+
+---
+ lib/gettext/tools/msginit.rb |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/gettext/tools/msginit.rb b/lib/gettext/tools/msginit.rb
+index 49247fd..69b2551 100644
+--- a/lib/gettext/tools/msginit.rb
++++ b/lib/gettext/tools/msginit.rb
+@@ -216,6 +216,8 @@ module GetText
+       end
+ 
+       def prompt(message, default)
++        return default if $stdin.eof?
++
+         print(message)
+         print(" [#{default}]") if default
+         print(": ")
diff --git a/debian/patches/series b/debian/patches/series
index b49c9d2..5674133 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+0001-Properly-handle-a-closed-stdin-when-prompting-in-msg.patch
 0002-Make-test-unit-notify-and-test-unit-rr-optional-to-r.patch
 0003-Do-not-use-Bundler-in-Rakefile.patch
 0004-Use-system-racc-in-Rakefile.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gettext.git



More information about the Pkg-ruby-extras-commits mailing list