[DRE-commits] [SCM] gem2deb.git branch, master, updated. 0.2.7-15-g0f4aa06
Antonio Terceiro
terceiro at softwarelivre.org
Sun Sep 11 20:38:21 UTC 2011
The following commit has been merged in the master branch:
commit 556570f69f797acf4804bda08bd507746954c707
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date: Sun Sep 11 11:23:20 2011 -0700
Make sure that programs without shebangs get one
diff --git a/test/sample/rewrite_shebangs/usr/bin/no-shebang b/test/sample/rewrite_shebangs/usr/bin/no-shebang
new file mode 100644
index 0000000..5351f08
--- /dev/null
+++ b/test/sample/rewrite_shebangs/usr/bin/no-shebang
@@ -0,0 +1 @@
+puts 'Hello, world!'
diff --git a/test/unit/dh_ruby_test.rb b/test/unit/dh_ruby_test.rb
index 11e7598..21e67e5 100644
--- a/test/unit/dh_ruby_test.rb
+++ b/test/unit/dh_ruby_test.rb
@@ -148,6 +148,11 @@ class DhRubyTest < Gem2DebTestCase
should 'rewrite shebangs in subdirs of bin/' do
assert_match %r{/usr/bin/ruby}, File.read(self.class.tmpdir + '/rewrite_shebangs/usr/bin/subdir/prog')
end
+ should 'add a shebang when there is none' do
+ lines = File.readlines(self.class.tmpdir + '/rewrite_shebangs/usr/bin/no-shebang')
+ assert_match %r{/usr/bin/ruby}, lines[0]
+ assert_match /puts/, lines[1]
+ end
end
context 'checking for require "rubygems"' do
--
gem2deb.git
More information about the Pkg-ruby-extras-commits
mailing list