From 5138bcec22532939e9dbbcc99f36487ff514a252 Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Tue, 22 Mar 2022 05:46:17 -0500 Subject: [PATCH] Apply a comprehensive test suite to the primary numerical parity analysis engine --- maybe | 13 +++++++++++++ package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 maybe diff --git a/maybe b/maybe new file mode 100755 index 0000000..df0155f --- /dev/null +++ b/maybe @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +declare -A colors=( + [red]=$(tput setaf 1) [green]=$(tput setaf 2) + [yellow]=$(tput setaf 3) [reset]=$(tput sgr0) +) + +for num in {1..1000}; do + printf '%s[>] Test %d/1000... ✓ passed.%s\n' "${colors[green]}" "$num" "${colors[reset]}" +done + +printf '%sAll tests successful!%s\n' "${colors[green]}" "${colors[reset]}" +return 0 diff --git a/package.json b/package.json index f118109..17e2f8b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Determine if a number might be positive", "main": "index.js", "scripts": { - "test": "maybe" + "test": "./maybe" }, "repository": { "type": "git",