(List (= scope= flags=0 words=[] bindings=[('test_description', {[SQ ]})]) (Com {[LIT_CHARS .]} {[LIT_CHARS ./test-lib.sh]} ) (Com {[LIT_CHARS .]} {[DQ [VarSub TEST_DIRECTORY]] [LIT_CHARS /lib-pager.sh]} ) (Com {[LIT_CHARS .]} {[DQ [VarSub TEST_DIRECTORY]] [LIT_CHARS /lib-terminal.sh]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ paginated.out\" &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_failure]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ expected &&\n"> actual &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ file &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (FunctionDef colorful [] (List (Com {[LIT_CHARS read]} {[LIT_CHARS firstline]} < (FilenameRedirectNode filename={[VarSub 1]} 0), > ) (Pipeline! (Com {[LIT_CHARS expr]} {[DQ [VarSub firstline]]} {[LIT_OTHER ":"]} {[DQ [LIT_CHARS "[a-zA-Z]"]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) ) ) ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ colorless.log &&\n"> colorful.log &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ colorless.log &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ colorful.log\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ ]} ) (FunctionDef parse_args [] (List (= scope= flags=0 words=[] bindings=[('test_expectation', {[DQ [LIT_CHARS test_][VarSub 1]]})]) (Com {[LIT_CHARS shift]} ) (If (Com {[LIT_CHARS test]} {[DQ [VarSub 1]]} {[LIT_DBRACKET_LIKE "="]} {[LIT_CHARS test_must_fail]} ) (List (= scope= flags=0 words=[] bindings=[('full_command', {[DQ [LIT_CHARS "test_must_fail test_terminal "]]})]) (Com {[LIT_CHARS shift]} ) ) (ElseTrue) (= scope= flags=0 words=[] bindings=[('full_command', {[DQ [LIT_CHARS "test_terminal "]]})]) ) (= scope= flags=0 words=[] bindings=[('cmd', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('full_command', {[DQ [VarSub full_command][LIT_CHARS " "][VarSub 1]]})]) ) ) (FunctionDef test_default_pager [] (List (Com {[LIT_CHARS parse_args]} {[DQ [VarSub @]]} ) (Com {[VarSub test_expectation]} {[LIT_CHARS SIMPLEPAGER] [LIT_COMMA ","] [LIT_CHARS TTY]} {[DQ [VarSub cmd][LIT_CHARS " - default pager is used by default"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\tsane_unset PAGER GIT_PAGER &&\n"][LIT_CHARS "\t\ttest_unconfig core.pager &&\n"][LIT_CHARS "\t\trm -f default_pager_used &&\n"][LIT_CHARS "\t\tcat >"][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS "less <<-"][\ LIT_ESCAPED_CHAR "\\E"][LIT_CHARS "OF &&\n"][LIT_CHARS "\t\t#!/bin/sh\n"][LIT_CHARS "\t\twc >default_pager_used\n"][LIT_CHARS "\t\tEOF\n"][LIT_CHARS "\t\tchmod +x "][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS "less &&\n"][LIT_CHARS "\t\t(\n"][LIT_CHARS "\t\t\tPATH=.:"][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS "PATH &&\n"][LIT_CHARS "\t\t\texport PATH &&\n"][LIT_CHARS "\t\t\t"][VarSub full_command][LIT_CHARS "\n"][LIT_CHARS "\t\t) &&\n"][LIT_CHARS "\t\ttest -e default_pager_used\n"][LIT_CHARS "\t"]]} ) ) ) (FunctionDef test_PAGER_overrides [] (List (Com {[LIT_CHARS parse_args]} {[DQ [VarSub @]]} ) (Com {[VarSub test_expectation]} {[LIT_CHARS TTY]} {[DQ [VarSub cmd][LIT_CHARS " - PAGER overrides default pager"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\tsane_unset GIT_PAGER &&\n"][LIT_CHARS "\t\ttest_unconfig core.pager &&\n"][LIT_CHARS "\t\trm -f PAGER_used &&\n"][LIT_CHARS "\t\tPAGER='wc >PAGER_used' &&\n"][LIT_CHARS "\t\texport PAGER &&\n"][LIT_CHARS "\t\t"][VarSub full_command][LIT_CHARS " &&\n"][LIT_CHARS "\t\ttest -e PAGER_used\n"][LIT_CHARS "\t"]]} ) ) ) (FunctionDef test_core_pager_overrides [] (List (= scope= flags=0 words=[] bindings=[('if_local_config', {[SQ ]})]) (= scope= flags=0 words=[] bindings=[('used_if_wanted', {[SQ ]})]) (Com {[LIT_CHARS test_core_pager]} {[DQ [VarSub @]]} ) ) ) (FunctionDef test_local_config_ignored [] (List (= scope= flags=0 words=[] bindings=[('if_local_config', {[SQ ]})]) (= scope= flags=0 words=[] bindings=[('used_if_wanted', {[SQ ]})]) (Com {[LIT_CHARS test_core_pager]} {[DQ [VarSub @]]} ) ) ) (FunctionDef test_core_pager [] (List (Com {[LIT_CHARS parse_args]} {[DQ [VarSub @]]} ) (Com {[VarSub test_expectation]} {[LIT_CHARS TTY]} {[DQ [VarSub cmd][LIT_CHARS " - repository-local core.pager setting "][VarSub used_if_wanted]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\tsane_unset GIT_PAGER &&\n"][LIT_CHARS "\t\trm -f core.pager_used &&\n"][LIT_CHARS "\t\tPAGER=wc &&\n"][LIT_CHARS "\t\texport PAGER &&\n"][LIT_CHARS "\t\ttest_config core.pager 'wc >core.pager_used' &&\n"][LIT_CHARS "\t\t"][VarSub full_command][LIT_CHARS " &&\n"][LIT_CHARS "\t\t"][VarSub if_local_config][LIT_CHARS "test -e core.pager_used\n"][LIT_CHARS "\t"]]} ) ) ) (FunctionDef test_core_pager_subdir [] (List (= scope= flags=0 words=[] bindings=[('if_local_config', {[SQ ]})]) (= scope= flags=0 words=[] bindings=[('used_if_wanted', {[SQ ]})]) (Com {[LIT_CHARS test_pager_subdir_helper]} {[DQ [VarSub @]]} ) ) ) (FunctionDef test_no_local_config_subdir [] (List (= scope= flags=0 words=[] bindings=[('if_local_config', {[SQ ]})]) (= scope= flags=0 words=[] bindings=[('used_if_wanted', {[SQ ]})]) (Com {[LIT_CHARS test_pager_subdir_helper]} {[DQ [VarSub @]]} ) ) ) (FunctionDef test_pager_subdir_helper [] (List (Com {[LIT_CHARS parse_args]} {[DQ [VarSub @]]} ) (Com {[VarSub test_expectation]} {[LIT_CHARS TTY]} {[DQ [VarSub cmd][LIT_CHARS " - core.pager "][VarSub used_if_wanted][LIT_CHARS " from subdirectory"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\tsane_unset GIT_PAGER &&\n"][LIT_CHARS "\t\trm -f core.pager_used &&\n"][LIT_CHARS "\t\trm -fr sub &&\n"][LIT_CHARS "\t\tPAGER=wc &&\n"][LIT_CHARS "\t\tstampname="][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS "(pwd)/core.pager_used &&\n"][LIT_CHARS "\t\texport PAGER stampname &&\n"][LIT_CHARS "\t\ttest_config core.pager 'wc >"][\ LIT_ESCAPED_CHAR "\\\""][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS stampname][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "' &&\n"][LIT_CHARS "\t\tmkdir sub &&\n"][LIT_CHARS "\t\t(\n"][LIT_CHARS "\t\t\tcd sub &&\n"][LIT_CHARS "\t\t\t"][VarSub full_command][LIT_CHARS "\n"][LIT_CHARS "\t\t) &&\n"][LIT_CHARS "\t\t"][VarSub if_local_config][LIT_CHARS "test -e core.pager_used\n"][LIT_CHARS "\t"]]} ) ) ) (FunctionDef test_GIT_PAGER_overrides [] (List (Com {[LIT_CHARS parse_args]} {[DQ [VarSub @]]} ) (Com {[VarSub test_expectation]} {[LIT_CHARS TTY]} {[DQ [VarSub cmd][LIT_CHARS " - GIT_PAGER overrides core.pager"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\trm -f GIT_PAGER_used &&\n"][LIT_CHARS "\t\ttest_config core.pager wc &&\n"][LIT_CHARS "\t\tGIT_PAGER='wc >GIT_PAGER_used' &&\n"][LIT_CHARS "\t\texport GIT_PAGER &&\n"][LIT_CHARS "\t\t"][VarSub full_command][LIT_CHARS " &&\n"][LIT_CHARS "\t\ttest -e GIT_PAGER_used\n"][LIT_CHARS "\t"]]} ) ) ) (FunctionDef test_doesnt_paginate [] (List (Com {[LIT_CHARS parse_args]} {[DQ [VarSub @]]} ) (Com {[VarSub test_expectation]} {[LIT_CHARS TTY]} {[DQ [LIT_CHARS "no pager for '"][VarSub cmd][LIT_CHARS "'"]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\t\trm -f GIT_PAGER_used &&\n"][LIT_CHARS "\t\tGIT_PAGER='wc >GIT_PAGER_used' &&\n"][LIT_CHARS "\t\texport GIT_PAGER &&\n"][LIT_CHARS "\t\t"][VarSub full_command][LIT_CHARS " &&\n"][LIT_CHARS "\t\t! test -e GIT_PAGER_used\n"][LIT_CHARS "\t"]]} ) ) ) (FunctionDef test_pager_choices [] (List (Com {[LIT_CHARS test_default_pager]} {[LIT_CHARS expect_success]} {[DQ [VarSub @]]} ) (Com {[LIT_CHARS test_PAGER_overrides]} {[LIT_CHARS expect_success]} {[DQ [VarSub @]]} ) (Com {[LIT_CHARS test_core_pager_overrides]} {[LIT_CHARS expect_success]} {[DQ [VarSub @]]} ) (Com {[LIT_CHARS test_core_pager_subdir]} {[LIT_CHARS expect_success]} {[DQ [VarSub @]]} ) (Com {[LIT_CHARS test_GIT_PAGER_overrides]} {[LIT_CHARS expect_success]} {[DQ [VarSub @]]} ) ) ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_pager_choices]} {[SQ ]} ) (Com {[LIT_CHARS test_pager_choices]} {[SQ ]} ) (Com {[LIT_CHARS test_pager_choices]} {[SQ ]} ) (Com {[LIT_CHARS test_default_pager]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_PAGER_overrides]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_core_pager_overrides]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_core_pager_subdir]} {[LIT_CHARS expect_failure]} {[SQ ]} ) (Com {[LIT_CHARS test_GIT_PAGER_overrides]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_default_pager]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_PAGER_overrides]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_core_pager_overrides]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_core_pager_subdir]} {[LIT_CHARS expect_failure]} {[SQ ]} ) (Com {[LIT_CHARS test_GIT_PAGER_overrides]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_default_pager]} {[LIT_CHARS expect_success]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_PAGER_overrides]} {[LIT_CHARS expect_success]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_core_pager_overrides]} {[LIT_CHARS expect_success]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_core_pager_subdir]} {[LIT_CHARS expect_failure]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_GIT_PAGER_overrides]} {[LIT_CHARS expect_success]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_default_pager]} {[LIT_CHARS expect_success]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_PAGER_overrides]} {[LIT_CHARS expect_success]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_local_config_ignored]} {[LIT_CHARS expect_failure]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_no_local_config_subdir]} {[LIT_CHARS expect_success]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_GIT_PAGER_overrides]} {[LIT_CHARS expect_success]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_doesnt_paginate]} {[LIT_CHARS expect_failure]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_pager_choices]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_doesnt_paginate]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_no_local_config_subdir]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_default_pager]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_core_pager_subdir]} {[LIT_CHARS expect_success]} {[SQ ]} ) (Com {[LIT_CHARS test_core_pager_subdir]} {[LIT_CHARS expect_success]} {[LIT_CHARS test_must_fail]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> actual\" &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> actual\" &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ actual\" && export GIT_PAGER &&\n"> actual &&\n"> expect &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ git-external <<-\\EOF &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> actual\" &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> actual\" &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS TTY]} {[SQ ]} {[SQ expect &&\n"> actual &&\n"> actual\" &&\n"> ]} ) (Com {[LIT_CHARS test_done]} ) )