X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Funit_test%2Ftest_array_sifter.sh;fp=scripts%2Funit_test%2Ftest_array_sifter.sh;h=0000000000000000000000000000000000000000;hb=b549c5ccea6b282f40add4dcefe1ef1a6865cbe6;hp=26173f193fdb6c31a2f81a2d473b0903e651b45f;hpb=757317fa749bd47b958d43c3227f747d4ddc5add;p=feisty_meow.git diff --git a/scripts/unit_test/test_array_sifter.sh b/scripts/unit_test/test_array_sifter.sh deleted file mode 100644 index 26173f19..00000000 --- a/scripts/unit_test/test_array_sifter.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# tests the array sifter methods. - -source $FEISTY_MEOW_SCRIPTS/core/array_sifter.sh - -#demo 1 & 2 for test presence. -declare -a my_array=(peanuts sauce fish basil) - -test1=basil -test_presence my_array $test1 -if [ $? != 0 ]; then - echo "test1 did not find flag, but should have." -else - echo "test1 found expected flag." -fi - -test2=spoo -test_presence my_array $test2 -if [ $? != 0 ]; then - echo "test2 did not find flag, which is correct." -else - echo "test2 found flag when should not have." -fi - -############################################# - -#demo3 for sifting... - -declare -a sift_list=(ontrack selenium aggressive) -declare -a stripping=(selenium) -declare -a store_list=() - -sift_array "sift_list" "stripping" "store_list" -if [ ${store_list[0]} == "selenium" ]; then - echo "test3 found expected content in storage list." -else - echo "test3 was missing expected content in storage list." -fi -echo sift is now ${sift_list[*]} -if [ "${sift_list[*]}" == "ontrack aggressive" ]; then - echo "test3 found expected content in sifting list." -else - echo "test3 was missing expected content in sifting list." -fi - -