-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup tests script and hello
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
}, | ||
"output_env_file": ".env", | ||
"version": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# ANSI color codes for green and red | ||
GREEN='\033[0;32m' | ||
RED='\033[0;31m' | ||
NC='\033[0m' # No Color | ||
|
||
# Test the greet function | ||
RESPONSE=$(dfx canister call parsekoto_backend greet '("ICP")') | ||
|
||
# Verify the result | ||
EXPECTED='"Hello, ICP!"' | ||
if [[ "$RESPONSE" == *"$EXPECTED"* ]]; then | ||
echo -e "${GREEN}Test passed: $RESPONSE${NC}" | ||
else | ||
echo -e "${RED}Test failed: Expected $EXPECTED but got $RESPONSE${NC}" | ||
exit 1 | ||
fi | ||
|