corrected erroneous return type in test hash table. made search_text skip binary...
authorChris Koeritz <fred@gruntose.com>
Tue, 31 Mar 2015 01:42:10 +0000 (21:42 -0400)
committerChris Koeritz <fred@gruntose.com>
Tue, 31 Mar 2015 01:42:10 +0000 (21:42 -0400)
nucleus/library/tests_structures/test_hash_table.cpp
scripts/text/search_text.sh

index 0fc446c2d1e8ff9630ee9ee8da8dc431b561b712..ca0d465fcf9b980617680b0a68e1739436b3f493 100644 (file)
@@ -247,7 +247,8 @@ bool test_hash_table::test_add()
   to_add->snacky_string = string_manipulation::make_random_name();
   to_add->food_bar = random_id;
   outcome expected = common::IS_NEW;
-  if (_keys_in_use.member(random_id)) return common::EXISTING;
+  // make sure it doesn't exist already.
+  if (_keys_in_use.member(random_id)) return false;
   ASSERT_EQUAL(_the_table.add(random_id, to_add).value(), expected.value(),
       "add should give proper outcome based on expectation");
   if (_keys_in_use.member(random_id))
@@ -520,3 +521,4 @@ return false;
 
 HOOPLE_MAIN(test_hash_table, )
 
+
index 48905405074de13f16d3b37e8d0abd813a393893..c0abee90a5259f4363eabe69543d44fd27e16dd4 100644 (file)
@@ -50,6 +50,11 @@ find "$dir" -type f \( -iname "*" \
   ! -iname "*.xls" \
   ! -iname "*.xlsx" \
   ! -iname "*.zip" \) \
-  -exec echo "\"{}\"" ';' | xargs grep -li -- "$seek" | grep -v "^\.[^\/]\|\/\."
+  -exec echo "\"{}\"" ';' | xargs grep -li --binary-files=without-match -- "$seek" | grep -v "^\.[^\/]\|\/\."
+
+# first grep looks in every valid file for the pattern requested.
+# second grep strains out dot files.
+#hmmm: why are we doing that second step?
+