test/mediainfo_string_test.rb in mediainfo-0.7.0 vs test/mediainfo_string_test.rb in mediainfo-0.7.1
- old
+ new
@@ -1,12 +1,20 @@
require "test_helper"
require "mediainfo_test_helper"
class MediainfoStringTest < ActiveSupport::TestCase
test "escaping slashes" do
- assert_equal '$\'foo\\\bar\'', 'foo\bar'.shell_escape
+ assert_equal '"foo\\\bar"', 'foo\bar'.shell_escape_double_quotes
end
test "escaping quotes" do
- assert_equal '$\'foo\\\'bar\'', "foo'bar".shell_escape
+ assert_equal '"foo\"bar"', 'foo"bar'.shell_escape_double_quotes
+ end
+
+ test "escaping ticks" do
+ assert_equal '"foo\`bar"', 'foo`bar'.shell_escape_double_quotes
+ end
+
+ test "escaping dollar signs" do
+ assert_equal '"foo\$bar"', 'foo$bar'.shell_escape_double_quotes
end
end