Mercurial > hg
comparison tests/test-hgweb-commands.t @ 19626:cf6b086d64cc
solaris: test cases can't use grep -a
The -a option to GNU grep isn't available when using Solaris grep. Replace
the one use of grep -a in the testsuite with some in-line Python that does
the equivalent, and add a check for grep -a in check-code.py.
author | Danek Duvall <danek.duvall@oracle.com> |
---|---|
date | Fri, 23 Aug 2013 14:31:42 -0700 |
parents | b5e3f2b1d5e9 |
children | 49a068b8fb0c |
comparison
equal
deleted
inserted
replaced
19625:6a411a06cb1f | 19626:cf6b086d64cc |
---|---|
1253 $ echo foo >> foo | 1253 $ echo foo >> foo |
1254 $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'` | 1254 $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'` |
1255 | 1255 |
1256 Graph json escape of multibyte character | 1256 Graph json escape of multibyte character |
1257 | 1257 |
1258 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/' \ | 1258 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/' > out |
1259 > | grep -a '^var data =' | 1259 >>> for line in open("out"): |
1260 ... if line.startswith("var data ="): | |
1261 ... print line, | |
1260 var data = [["061dd13ba3c3", [0, 1], [[0, 0, 1, -1, ""]], "\\u80fd", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["cad8025a2e87", [0, 1], [[0, 0, 1, 3, "FF0000"]], "branch commit with null character: \x00", "test", "1970-01-01", ["unstable", false], [], []], ["1d22e65f027e", [0, 1], [[0, 0, 1, 3, ""]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, 3, ""]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]]; (esc) | 1262 var data = [["061dd13ba3c3", [0, 1], [[0, 0, 1, -1, ""]], "\\u80fd", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["cad8025a2e87", [0, 1], [[0, 0, 1, 3, "FF0000"]], "branch commit with null character: \x00", "test", "1970-01-01", ["unstable", false], [], []], ["1d22e65f027e", [0, 1], [[0, 0, 1, 3, ""]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, 3, ""]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]]; (esc) |
1261 | 1263 |
1262 capabilities | 1264 capabilities |
1263 | 1265 |
1264 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo | 1266 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo |