view tests/test-bad-extension @ 10475:2253715fde97

color: don't crash on invalid status codes (issue2036) If an unknown file with a newline appears in the status output, color shouldn't raise a KeyError trying to parse second line in the filename.
author Brodie Rao <me+hg@dackz.net>
date Sun, 14 Feb 2010 17:08:52 -0500
parents f8a86ea7521b
children
line wrap: on
line source

#!/bin/sh

echo 'raise Exception("bit bucket overflow")' > badext.py
abspath=`pwd`/badext.py

echo '[extensions]' >> $HGRCPATH
echo "gpg =" >> $HGRCPATH
echo "hgext.gpg =" >> $HGRCPATH
echo "badext = $abspath" >> $HGRCPATH
echo "badext2 =" >> $HGRCPATH

hg -q help help 2>&1 | python -c \
  "import sys; sys.stdout.write(sys.stdin.read().replace('$abspath', '.../badext.py'))"