sapling/eden/scm/tests/test-debugshell-args.t
Jun Wu 90c062ca08 debugshell: accept file name
Summary:
This makes debugshell easier to use. Especially when the script wants to access
`__file__`.

Reviewed By: DurhamG

Differential Revision: D21169556

fbshipit-source-id: 88b3ebb1ca9a39fe26bc7cc5ea8e250c28fa0d6f
2020-04-27 10:58:56 -07:00

13 lines
266 B
Perl

#chg-compatible
$ cat >> foo.py << EOF
> ui.write('argv = %r\n' % (sys.argv,))
> EOF
$ hg debugshell foo.py 1 2 3
argv = ('foo.py', '1', '2', '3')
$ hg debugshell -c "$(cat foo.py)" 1 2 3
argv = ('1', '2', '3')
$ hg debugshell < foo.py
argv = ()