3 # tests the array sifter methods.
5 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
6 source "$FEISTY_MEOW_SCRIPTS/core/array_sifter.sh"
8 #demo 1 & 2 for test presence.
9 declare -a my_array=(peanuts sauce fish basil)
12 test_presence my_array $test1
14 echo "test1 did not find flag, but should have."
16 echo "test1 found expected flag."
20 test_presence my_array $test2
22 echo "test2 did not find flag, which is correct."
24 echo "test2 found flag when should not have."
27 #############################################
31 declare -a sift_list=(ontrack selenium aggressive)
32 declare -a stripping=(selenium)
33 declare -a store_list=()
35 sift_array "sift_list" "stripping" "store_list"
36 if [ ${store_list[0]} == "selenium" ]; then
37 echo "test3 found expected content in storage list."
39 echo "test3 was missing expected content in storage list."
41 echo sift is now ${sift_list[*]}
42 if [ "${sift_list[*]}" == "ontrack aggressive" ]; then
43 echo "test3 found expected content in sifting list."
45 echo "test3 was missing expected content in sifting list."