sapling/tests/testutil
Jun Wu 27908b883c testutil/dott: initial framework
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
2019-07-17 21:11:28 -07:00
..
dott testutil/dott: initial framework 2019-07-17 21:11:28 -07:00
__init__.py
argspans.py testutil: add a utility to calculate argument positions 2019-07-17 21:11:27 -07:00
autofix.py testutil: add "eq" assertion with autofix ability 2019-07-17 21:11:27 -07:00