[DRE-commits] [SCM] gem2deb.git branch, master, updated. 0.2.9-3-gcfcc1b7

Antonio Terceiro terceiro at softwarelivre.org
Sat Sep 24 19:05:58 UTC 2011


The following commit has been merged in the master branch:
commit 1cf4aa00b36a50037ed5e6e771a3c157b2b866d5
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Sat Sep 24 12:02:15 2011 -0700

    Should not rewrite the shebang of non-Ruby scripts

diff --git a/test/sample/rewrite_shebangs/usr/bin/shell-script b/test/sample/rewrite_shebangs/usr/bin/shell-script
new file mode 100644
index 0000000..c070e3d
--- /dev/null
+++ b/test/sample/rewrite_shebangs/usr/bin/shell-script
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -e
+
+echo "Hello, world!"
diff --git a/test/unit/dh_ruby_test.rb b/test/unit/dh_ruby_test.rb
index 0d0afdb..99ad3ff 100644
--- a/test/unit/dh_ruby_test.rb
+++ b/test/unit/dh_ruby_test.rb
@@ -153,6 +153,10 @@ class DhRubyTest < Gem2DebTestCase
       assert_match %r{/usr/bin/env ruby}, lines[0]
       assert_match /puts/, lines[1]
     end
+    should 'not rewrite shebangs non-Ruby scripts' do
+      lines = File.readlines(self.class.tmpdir + '/rewrite_shebangs/usr/bin/shell-script')
+      assert_match %r{/bin/sh}, lines[0]
+    end
     should 'leave programs with correct permissions after rewriting shebangs' do
       assert_equal '100755', '%o' % File.stat(self.class.tmpdir + '/rewrite_shebangs/usr/bin/no-shebang').mode
     end

-- 
gem2deb.git



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