Fix a test

This commit is contained in:
Alessio 2021-08-02 14:55:59 -07:00
parent 18a63cd2eb
commit c4c2ef8979
2 changed files with 3 additions and 3 deletions

View File

@ -17,6 +17,6 @@ test $(sqlite3 data/twitter.db "select count(*) from users") = "1"
# Fetch a tweet with images
go run ./twitter fetch_tweet_only data https://twitter.com/Denlesks/status/1261483383483293700
test $(sqlite3 data/twitter.db "select count(*) from tweets") = "1"
test $(sqlite3 data/twitter.db "select text from tweets") = "These are public health officials who are making decisions about your lifestyle because they know more about health, fitness and well-being than you do"
test "$(sqlite3 data/twitter.db "select text from tweets")" = "These are public health officials who are making decisions about your lifestyle because they know more about health, fitness and well-being than you do"
go run ./twitter fetch_tweet_only data https://twitter.com/Denlesks/status/1261483383483293700
test $(sqlite3 data/twitter.db "select count(*) from tweets") = "1"

View File

@ -32,10 +32,10 @@ TARGET is optional depending on <operation>
*/
func die(text string, display_help bool, exit_code int) {
if text != "" {
fmt.Print(terminal_utils.COLOR_RED + text + terminal_utils.COLOR_RESET + "\n")
fmt.Fprint(os.Stderr, terminal_utils.COLOR_RED + text + terminal_utils.COLOR_RESET + "\n")
}
if display_help {
fmt.Print(help_message)
fmt.Fprint(os.Stderr, help_message)
}
os.Exit(exit_code)
}