tests/test-revert-interactive-curses.t
author Sushil khanchi <sushilkhanchi97@gmail.com>
Thu, 27 Aug 2020 12:24:57 +0530
changeset 45406 fa1a5527f642
parent 45153 8b6a446508c2
child 46325 e5e6282fa66a
permissions -rw-r--r--
tests: add a --retest test to demonstrate a fix in next patch As you see above the added lines, there was only one test failed. So the output should be: "running 1 tests using 1 parallel processes" Next patch will be fixing this. Differential Revision: https://phab.mercurial-scm.org/D8964

#require tic

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)