# Helpers for tests of git's choice of pager. test_expect_success 'determine default pager' ' test_might_fail git config --unset core.pager && less=$( unset PAGER GIT_PAGER; git var GIT_PAGER ) && test -n "$less" ' if expr $less : '[a-z][a-z]*$' >/dev/null { test_set_prereq SIMPLEPAGER } (CommandList children: [ (C {(test_expect_success)} {(SQ <"determine default pager">)} { (SQ <"\n"> <"\ttest_might_fail git config --unset core.pager &&\n"> <"\tless=$(\n"> <"\t\tunset PAGER GIT_PAGER;\n"> <"\t\tgit var GIT_PAGER\n"> <"\t) &&\n"> <"\ttest -n \"$less\"\n"> ) } ) (If arms: [ (if_arm cond: [ (SimpleCommand words: [{(expr)} {(DQ ($ VSub_Name "$less"))} {(Lit_Other ":")} {(SQ <"[a-z][a-z]*$">)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[35])] ) ] action: [(C {(test_set_prereq)} {(SIMPLEPAGER)})] spids: [-1 38] ) ] spids: [-1 45] ) ] )