Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasballinger committed Dec 30, 2020
1 parent 52bfe47 commit e4960cc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -2232,6 +2232,16 @@ def test_file_packager_unicode(self):
assert unicode_name in proc.stdout, proc.stdout
print(len(proc.stderr))

def test_file_packager_directory_with_single_quote(self):
single_quote_name = "direc'tory"
full = os.path.join(single_quote_name, 'data.txt')
create_test_file(full, 'data')
proc = self.run_process([FILE_PACKAGER, 'test.data', '--preload', full], stdout=PIPE, stderr=PIPE)
assert len(proc.stdout), proc.stderr
# ensure not invalid JavaScript
assert "'direc'tory'" not in proc.stdout
assert json.dumps("direc'tory") in proc.stdout

def test_file_packager_mention_FORCE_FILESYSTEM(self):
MESSAGE = 'Remember to build the main file with -s FORCE_FILESYSTEM=1 so that it includes support for loading this file package'
create_test_file('data.txt', 'data1')
Expand Down

0 comments on commit e4960cc

Please sign in to comment.