Skip to content

Commit 3f9d6b9

Browse files
authored
emsize: accept single and double-dashed flavors of the format flag (emscripten-core#16963)
The flag is still ignored as before.
1 parent 103a218 commit 3f9d6b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

emsize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def error(text):
3838

3939
def parse_args(argv):
4040
parser = argparse.ArgumentParser(description=__doc__)
41-
parser.add_argument('-format')
41+
parser.add_argument('-format', '--format')
4242
parser.add_argument('file')
4343
args = parser.parse_args(argv)
4444
return args.file

tests/test_other.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def test_emsize(self):
605605
# emcc tests/hello_world.c -Oz --closure 1 -o tests/other/test_emsize.js
606606
expected = read_file(test_file('other/test_emsize.out'))
607607
cmd = [emsize, test_file('other/test_emsize.js')]
608-
for command in [cmd, cmd + ['-format=sysv']]:
608+
for command in [cmd, cmd + ['--format=sysv']]:
609609
output = self.run_process(cmd, stdout=PIPE).stdout
610610
self.assertContained(expected, output)
611611

0 commit comments

Comments
 (0)