view tests/test-profile.t @ 25925:23c4589fc678 stable

filesets: ignore unit case in size() predicate for single value When specifying one plain value in size(), e.g. size(1k), fileset tries to guess the upper bound automatically (see the comment in _sizetomax()). It didn't ignore the specified unit's case, and so size("1 GB"), for example, produced this error: hg: parse error: couldn't parse size: 1 GB Let's do the same thing that util.sizetoint() does: .lower(). The two test lines without output just check that there are no parse errors.
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 08 Aug 2015 14:42:27 +0800
parents cd2c82510aa2
children 39a0b11158d8
line wrap: on
line source

test --time

  $ hg --time help -q help 2>&1 | grep time > /dev/null
  $ hg init a
  $ cd a

#if lsprof

test --profile

  $ hg --profile st 2>../out
  $ grep CallCount ../out > /dev/null || cat ../out

  $ hg --profile --config profiling.output=../out st
  $ grep CallCount ../out > /dev/null || cat ../out

  $ hg --profile --config profiling.format=text st 2>../out
  $ grep CallCount ../out > /dev/null || cat ../out

  $ echo "[profiling]" >> $HGRCPATH
  $ echo "format=kcachegrind" >> $HGRCPATH

  $ hg --profile st 2>../out
  $ grep 'events: Ticks' ../out > /dev/null || cat ../out

  $ hg --profile --config profiling.output=../out st
  $ grep 'events: Ticks' ../out > /dev/null || cat ../out

#endif

  $ cd ..