Add custom pages to list output (#285)

Fixes #205.
This commit is contained in:
Olav de Haas 2022-09-24 21:27:35 +02:00 committed by GitHub
commit f4a94112f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 12 deletions

View file

@ -513,6 +513,12 @@ fn test_pager_flag_enable() {
fn test_list_flag_rendering() {
let testenv = TestEnv::new();
// set custom pages directory
testenv.write_config(format!(
"[directories]\ncustom_pages_dir = '{}'",
testenv.custom_pages_dir.path().to_str().unwrap()
));
testenv
.command()
.args(["--list"])
@ -532,13 +538,17 @@ fn test_list_flag_rendering() {
testenv.add_entry("bar", "");
testenv.add_entry("baz", "");
testenv.add_entry("qux", "");
testenv.add_page_entry("faz", "");
testenv.add_page_entry("bar", "");
testenv.add_page_entry("fiz", "");
testenv.add_patch_entry("buz", "");
testenv
.command()
.args(["--list"])
.assert()
.success()
.stdout("bar\nbaz\nfoo\nqux\n");
.stdout("bar\nbaz\nfaz\nfiz\nfoo\nqux\n");
}
#[test]