From af1c8e9662aaa50fa2343569b252622421d9e577 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 6 May 2021 11:28:50 +0800 Subject: Do not show hint when fetching gists in test --- gist | 2 +- test.bats | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gist b/gist index 5f7cb74..0b8546e 100755 --- a/gist +++ b/gist @@ -430,7 +430,7 @@ _fetch_gists_with_pagnation() { local next_page='' [[ -e $HEADER ]] && next_page=$(sed -Ene '/^[lL]ink: / s/.+page=([[:digit:]]+)>; rel=\"next\".+/\1/p' $HEADER) [[ -z $next_page ]] && break - printf "%-4s gists fetched\n" $(( ($next_page -1) * $per_page )) > /dev/tty + [[ $hint != false ]] && printf "%-4s gists fetched\n" $(( ($next_page -1) * $per_page )) >/dev/tty _fetch_gists "?per_page=$per_page&page=$next_page" >> $1 done || return 1 diff --git a/test.bats b/test.bats index 20ca6a1..dd0f54c 100644 --- a/test.bats +++ b/test.bats @@ -71,7 +71,7 @@ export GIST_API_TOKEN='dd43dc9949a5b4a1d6c7''b779f13af357282016e4' } @test "The user command should get the list of public gists from a user" { - run ./gist user defunkt + hint=false run ./gist user defunkt [ "$status" -eq 0 ] [[ "${lines[0]}" =~ (https://gist.github.com/[0-9a-z]+ defunkt) ]] } -- cgit v1.2.3-70-g09d2