mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
224f9f11df
Reviewed By: xavierd Differential Revision: D20928615 fbshipit-source-id: daec7955957f9995d7ee87378b2e3ddf60932d07
30 lines
619 B
Raku
30 lines
619 B
Raku
#chg-compatible
|
|
|
|
#require parso
|
|
|
|
$ cat > a.py << EOF
|
|
> from testutil.autofix import eq
|
|
> from testutil.dott import sh
|
|
> eq(1 + 2, 0)
|
|
> eq(list(range(3)), None)
|
|
> eq("\n".join(map(str,range(3))), None)
|
|
> sh % "printf foo"
|
|
> sh % "printf bar" == "baz"
|
|
> EOF
|
|
|
|
$ hg debugpython -- a.py 2>&1 | tail -1
|
|
a.py:3: 3 != 0
|
|
|
|
$ hg debugpython -- a.py --fix
|
|
$ cat a.py
|
|
from testutil.autofix import eq
|
|
from testutil.dott import sh
|
|
eq(1 + 2, 3)
|
|
eq(list(range(3)), [0, 1, 2])
|
|
eq("\n".join(map(str,range(3))), r"""
|
|
0
|
|
1
|
|
2""")
|
|
sh % "printf foo" == 'foo'
|
|
sh % "printf bar" == 'bar'
|