diff options
author | Hsieh Chin Fan <typebrook@gmail.com> | 2021-05-06 11:28:50 +0800 |
---|---|---|
committer | Hsieh Chin Fan <typebrook@gmail.com> | 2021-05-06 11:28:50 +0800 |
commit | af1c8e9662aaa50fa2343569b252622421d9e577 (patch) | |
tree | 5467cdbd6636ea884d315a349a0d0d95c722c897 | |
parent | 2dd010b6813ad6c4b447cb9c1d4a60837d1a640b (diff) |
Do not show hint when fetching gists in test
-rwxr-xr-x | gist | 2 | ||||
-rw-r--r-- | test.bats | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -430,7 +430,7 @@ _fetch_gists_with_pagnation() { | |||
430 | local next_page='' | 430 | local next_page='' |
431 | [[ -e $HEADER ]] && next_page=$(sed -Ene '/^[lL]ink: / s/.+page=([[:digit:]]+)>; rel=\"next\".+/\1/p' $HEADER) | 431 | [[ -e $HEADER ]] && next_page=$(sed -Ene '/^[lL]ink: / s/.+page=([[:digit:]]+)>; rel=\"next\".+/\1/p' $HEADER) |
432 | [[ -z $next_page ]] && break | 432 | [[ -z $next_page ]] && break |
433 | printf "%-4s gists fetched\n" $(( ($next_page -1) * $per_page )) > /dev/tty | 433 | [[ $hint != false ]] && printf "%-4s gists fetched\n" $(( ($next_page -1) * $per_page )) >/dev/tty |
434 | 434 | ||
435 | _fetch_gists "?per_page=$per_page&page=$next_page" >> $1 | 435 | _fetch_gists "?per_page=$per_page&page=$next_page" >> $1 |
436 | done || return 1 | 436 | done || return 1 |
@@ -71,7 +71,7 @@ export GIST_API_TOKEN='dd43dc9949a5b4a1d6c7''b779f13af357282016e4' | |||
71 | } | 71 | } |
72 | 72 | ||
73 | @test "The user command should get the list of public gists from a user" { | 73 | @test "The user command should get the list of public gists from a user" { |
74 | run ./gist user defunkt | 74 | hint=false run ./gist user defunkt |
75 | [ "$status" -eq 0 ] | 75 | [ "$status" -eq 0 ] |
76 | [[ "${lines[0]}" =~ (https://gist.github.com/[0-9a-z]+ defunkt) ]] | 76 | [[ "${lines[0]}" =~ (https://gist.github.com/[0-9a-z]+ defunkt) ]] |
77 | } | 77 | } |