tests/parsetext: support reading documents from stdin