#!/bin/sh global test_description := ''basic checkout-index tests '' source ./test-lib.sh test_expect_success 'checkout-index --gobbledegook' ' test_expect_code 129 git checkout-index --gobbledegook 2>err && test_i18ngrep "[Uu]sage" err ' test_expect_success 'checkout-index -h in broken repository' ' mkdir broken && ( cd broken && git init && >.git/index && test_expect_code 129 git checkout-index -h >usage 2>&1 ) && test_i18ngrep "[Uu]sage" broken/usage ' test_done (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"basic checkout-index tests\n">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <"checkout-index --gobbledegook">)} { (SQ <"\n"> <"\ttest_expect_code 129 git checkout-index --gobbledegook 2>err &&\n"> <"\ttest_i18ngrep \"[Uu]sage\" err\n"> ) } ) (C {(test_expect_success)} {(SQ <"checkout-index -h in broken repository">)} { (SQ <"\n"> <"\tmkdir broken &&\n"> <"\t(\n"> <"\t\tcd broken &&\n"> <"\t\tgit init &&\n"> <"\t\t>.git/index &&\n"> <"\t\ttest_expect_code 129 git checkout-index -h >usage 2>&1\n"> <"\t) &&\n"> <"\ttest_i18ngrep \"[Uu]sage\" broken/usage\n"> ) } ) (C {(test_done)}) ] )