Mercurial > hg
changeset 42575:eec65b706caf
extdata: demonstrate bad behavior when a subprocess emits garbage
Differential Revision: https://phab.mercurial-scm.org/D6615
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 08 Jul 2019 13:57:44 -0400 |
parents | d28d91f9f35a |
children | ea6558db1011 |
files | tests/test-extdata.t |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-extdata.t Sun Jul 07 23:04:55 2019 -0700 +++ b/tests/test-extdata.t Mon Jul 08 13:57:44 2019 -0400 @@ -13,6 +13,7 @@ > notes = notes.txt > shelldata = shell:cat extdata.txt | grep 2 > emptygrep = shell:cat extdata.txt | grep empty + > badparse = shell:cat badparse.txt > EOF $ cat <<'EOF' > extdata.txt > 2 another comment on 2 @@ -58,6 +59,17 @@ abort: unknown extdata source 'unknown' [255] +test a zero-exiting source that emits garbage to confuse the revset parser + + $ cat > badparse.txt <<'EOF' + > +---------------------------------------+ + > 9de260b1e88e + > EOF + +BUG: this should print the revset parse error + $ hg log -qr "extdata(badparse)" 2>&1 | grep ValueError + ValueError: Mixing iteration and read methods would lose data + test template support: $ hg log -r:3 -T "{node|short}{if(extdata('notes'), ' # {extdata('notes')}')}\n"