##// END OF EJS Templates
test-highlight: factor out function that normalizes pygments output
Yuya Nishihara -
r27996:4301b991 default
parent child Browse files
Show More
@@ -10,6 +10,11 b''
10 $ hg init test
10 $ hg init test
11 $ cd test
11 $ cd test
12
12
13 $ filterhtml () {
14 > sed -e "s/class=\"k\"/class=\"kn\"/g" \
15 > -e "s/class=\"mf\"/class=\"mi\"/g"
16 > }
17
13 create random Python file to exercise Pygments
18 create random Python file to exercise Pygments
14
19
15 $ cat <<EOF > primes.py
20 $ cat <<EOF > primes.py
@@ -57,8 +62,7 b' hg serve'
57
62
58 hgweb filerevision, html
63 hgweb filerevision, html
59
64
60 $ (get-with-headers.py localhost:$HGPORT 'file/tip/primes.py') \
65 $ (get-with-headers.py localhost:$HGPORT 'file/tip/primes.py') | filterhtml
61 > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mf\"/class=\"mi\"/g"
62 200 Script output follows
66 200 Script output follows
63
67
64 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
68 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -190,8 +194,7 b' hgweb filerevision, html'
190
194
191 hgweb fileannotate, html
195 hgweb fileannotate, html
192
196
193 $ (get-with-headers.py localhost:$HGPORT 'annotate/tip/primes.py') \
197 $ (get-with-headers.py localhost:$HGPORT 'annotate/tip/primes.py') | filterhtml
194 > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mf\"/class=\"mi\"/g"
195 200 Script output follows
198 200 Script output follows
196
199
197 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
200 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
General Comments 0
You need to be logged in to leave comments. Login now