Summary:
run-tests.py uses common-pattern.py to normalize error messages to things
like `$ENOENT$`. Implement that behavior.
Reviewed By: xavierd
Differential Revision: D16209208
fbshipit-source-id: 3e609cc16442f80b844264f93dce9ea46517458d
Summary:
The testutil/dott module is to be "somehow" compatible with ".t" tests.
At its core, it emulates "bash" syntax using Python functions.
This diff adds the core "sh" syntax to call into Python functions.
The test code can be written as:
from testutil.dott import sh
sh % "echo foo" == "foo\n"
sh % "echo remotefilelog" > ".hg/requires"
sh % "cat" << "[extensions]\nrebase=" > ".hg/hgrc"
This is similar to ".t" test:
$ echo foo
foo
$ echo remotefilelog > .hg/requires
$ cat << EOF > .hg/hgrc
> [extensions]
> rebase=
> EOF
And is compat even after black formatting.
Reviewed By: xavierd
Differential Revision: D16172901
fbshipit-source-id: 7bb666e7e1621536ffdd6516542a468ac419d80a
Summary: The "eq" API is similar to `assert_eq!` in Rust, with the autofix ability.
Reviewed By: xavierd
Differential Revision: D16168821
fbshipit-source-id: bf7dcfd24c42dee30c54aeeaa71eccab78a8f0f6
Summary:
The utility is used by a later change which provides the "autofix" feature for
Python code.
Reviewed By: xavierd
Differential Revision: D16168823
fbshipit-source-id: feb55a9e6ba5e78ad0f490cadeeafbcc1306e8ca