Skip to content

Commit 6a4745c

Browse files
committed
Fix test failure under ruby2.7
In ruby2.7 `+` is no longer escaped ShellWords.shellescape. In order to make this test pass on ruby2.7 but also on older versions, drop the + the string that is expected to be escaped. Fixes #50
1 parent eecfb3e commit 6a4745c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/common.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ def prepare_directory(path, mode=0777, mtime=Time.now, atime=Time.now)
6262
# handles newlines just fine, so we can be reasonably confident that they
6363
# will work in practice
6464
def awful_file_name
65-
(((0x00..0x7f).to_a - [0x00, 0x0a, 0x2f]).map { |n| n.chr }).join + '.txt'
65+
(((0x00..0x7f).to_a - [0x00, 0x0a, 0x2b, 0x2f]).map { |n| n.chr }).join + '.txt'
6666
end
6767

6868
def escaped_file_name
69-
"\\\001\\\002\\\003\\\004\\\005\\\006\\\a\\\b\\\t\\\v\\\f\\\r\\\016\\\017\\\020\\\021\\\022\\\023\\\024\\\025\\\026\\\027\\\030\\\031\\\032\\\e\\\034\\\035\\\036\\\037\\ \\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+,-.0123456789:\\;\\<\\=\\>\\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\\[\\\\\\]\\^_\\`abcdefghijklmnopqrstuvwxyz\\{\\|\\}\\~\\\177.txt"
69+
"\\\001\\\002\\\003\\\004\\\005\\\006\\\a\\\b\\\t\\\v\\\f\\\r\\\016\\\017\\\020\\\021\\\022\\\023\\\024\\\025\\\026\\\027\\\030\\\031\\\032\\\e\\\034\\\035\\\036\\\037\\ \\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*,-.0123456789:\\;\\<\\=\\>\\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\\[\\\\\\]\\^_\\`abcdefghijklmnopqrstuvwxyz\\{\\|\\}\\~\\\177.txt"
7070
end
7171

7272
class FileEntry

0 commit comments

Comments
 (0)