[PATCH] tests: Fixed CSS change in test-highlight

Isaac Jurado diptongo at gmail.com
Mon Sep 22 06:37:12 CDT 2008


# HG changeset patch
# User Isaac Jurado <diptongo at gmail.com>
# Date 1222083381 -7200
# Node ID 4ed5f9f1b809e93f2886bbd22b8e52ba130286c6
# Parent  f29b674cc2210126c2899d94d882c367a8ea64bc
tests: Fixed CSS change in test-highlight.

When changing the pygments_style to test for dynamically generated CSS the hgrc
file was truncated, losing potentially relevant configuration options.

Now it preserves the previous contents, only changing a single line.

diff --git a/tests/test-highlight b/tests/test-highlight
--- a/tests/test-highlight
+++ b/tests/test-highlight
@@ -63,10 +63,8 @@
 kill `cat hg.pid`
 
 # Change the pygments style
-cat > .hg/hgrc <<EOF
-[web]
-pygments_style = fruity
-EOF
+sed -e '/^pygments_style/ s/friendly/fruity/' $HGRCPATH >$HGRCPATH.new
+mv -f $HGRCPATH.new $HGRCPATH
 
 echo % hg serve again
 hg serve -p $HGPORT -d -n test --pid-file=hg.pid -A access.log -E errors.log


More information about the Mercurial-devel mailing list