From cd4c3f9698c0df7492c58435c4391d8702063851 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Sun, 19 Feb 2023 03:10:05 -0800 Subject: [PATCH] test: assert info and help output (#1482) Co-authored-by: James Hegedus --- test/help_command.bats | 6 +++++- test/info_command.bats | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/help_command.bats b/test/help_command.bats index 9124cfb1..49e39654 100644 --- a/test/help_command.bats +++ b/test/help_command.bats @@ -73,5 +73,9 @@ EOF run asdf help [ "$status" -eq 0 ] - # TODO: Assert asdf help output is printed + [[ $output == 'version: v'* ]] + [[ $output == *$'MANAGE PLUGINS\n'* ]] + [[ $output == *$'MANAGE PACKAGES\n'* ]] + [[ $output == *$'UTILS\n'* ]] + [[ $output == *$'"Late but latest"\n-- Rajinikanth' ]] } diff --git a/test/info_command.bats b/test/info_command.bats index 57e69dec..f456df1e 100644 --- a/test/info_command.bats +++ b/test/info_command.bats @@ -23,5 +23,10 @@ teardown() { run asdf info [ "$status" -eq 0 ] - # TODO: Assert asdf info output is printed + [[ $output == *$'OS:\n'* ]] + [[ $output == *$'SHELL:\n'* ]] + [[ $output == *$'ASDF VERSION:\n'* ]] + [[ $output == *$'ASDF ENVIRONMENT VARIABLES:\n'* ]] + [[ $output == *$'ASDF INSTALLED PLUGINS:\n'* ]] + }