sapling/tests/test-dispatch-debug-prefix-t.py
Jun Wu a459d31cae testutil/dott: use bindings.commands to run commands
Summary:
This makes it possible to execute Rust commands from the Python tests.

Test changes:
- test-command-template-t: non-utf8 command-line arguments are rejected at the
  function signature level
- test-dispatch-debug-prefix-t: the error is now printed by Rust code, which
  uses spaces instead of tabs.
- test-root-t: the test now passes

Reviewed By: xavierd

Differential Revision: D16866459

fbshipit-source-id: 386931c5497b04c53efc08fbb4de708812517ad9
2019-08-28 19:26:26 -07:00

27 lines
599 B
Python

# Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
from testutil.dott import feature, sh, testtmp # noqa: F401
sh % "newrepo"
sh % "hg d" == ""
sh % "hg di --config alias.did=root" == r"""
hg: command 'di' is ambiguous:
did
diff
[255]"""
sh % "hg debugf" == r"""
hg: command 'debugf' is ambiguous:
debugfilerevision
debugfileset
debugformat
debugfsinfo
[255]"""