tests/test-revert-interactive-curses.t
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 01 May 2021 16:13:53 -0400
branchstable
changeset 47066 9e3979a25bfe
parent 46325 e5e6282fa66a
child 49033 9a5d09d7f108
permissions -rw-r--r--
tests: stabilize test-persistent-nodemap.t on Windows Several issues here: - Hooks can't invoke shell scripts on Windows, so use `sh` to launch - `dd` in MSYS only recognizes `status=noxfer` - The `PATH` updating triggered a massive slowdown, but is no longer needed I have no idea why, but removing the `PATH` update substantially increased the speed of the test. It was running finishing at ~4:30 with `--debug` and ~14:50 without it, but now completes in ~2:20 on my Windows laptop. Differential Revision: https://phab.mercurial-scm.org/D10636

#require curses

Revert interactive tests with the Curses interface

  $ cat <<EOF >> $HGRCPATH
  > [ui]
  > interactive = true
  > interface = curses
  > [experimental]
  > crecordtest = testModeCommands
  > EOF

TODO: Make a curses version of the other tests from test-revert-interactive.t.

When a line without EOL is selected during "revert -i"

  $ hg init $TESTTMP/revert-i-curses-eol
  $ cd $TESTTMP/revert-i-curses-eol
  $ echo 0 > a
  $ hg ci -qAm 0
  $ printf 1 >> a
  $ hg ci -qAm 1
  $ cat a
  0
  1 (no-eol)

  $ cat <<EOF >testModeCommands
  > c
  > EOF

  $ hg revert -ir'.^'
  reverting a
  $ cat a
  0

When a selected line is reverted to have no EOL

  $ hg init $TESTTMP/revert-i-curses-eol2
  $ cd $TESTTMP/revert-i-curses-eol2
  $ printf 0 > a
  $ hg ci -qAm 0
  $ echo 0 > a
  $ hg ci -qAm 1
  $ cat a
  0

  $ cat <<EOF >testModeCommands
  > c
  > EOF

  $ hg revert -ir'.^'
  reverting a
  $ cat a
  0 (no-eol)