Index: include/bu/file.h
===================================================================
--- include/bu/file.h	(revision 63699)
+++ include/bu/file.h	(working copy)
@@ -490,7 +490,24 @@
  */
 BU_EXPORT extern char **bu_argv_from_path(const char *path, int *ac);
 
+/**
+ * Fix the argv array for parameters passed to unit tests.
+ *
+ * Because CMake doesn't support passing empty strings as arguments to
+ * the test programs, the test call instead pass the special string
+ * BU_ARGV_EMPTY_STR as an argument, and call this function on their
+ * argv array.  It replaces any occurrences of BU_ARGV_EMPTY_STR with
+ * "", allowing the tests to behave as if the empty string had been
+ * passed.  It in-place updates the given argc and argv, allowing
+ * tests to be converted to work with this behavior simply by placing
+ * a call to bu_test_argv(&argc, argv) at the the beginning of main().
+ *
+ * @return -1 An error occurred while parsing the argv array.
+ * @return >= 0 The number of arguments replaced by the function.
+ */
+BU_EXPORT int bu_test_argv(int *argc, char ***argv);
 
+
 /** @file libbu/interrupt.c
  *
  * Routines for managing signals.  In particular, provide a common
Index: src/libbu/argv.c
===================================================================
--- src/libbu/argv.c	(revision 63699)
+++ src/libbu/argv.c	(working copy)
@@ -325,7 +325,27 @@
     return av;
 }
 
+int
+bu_test_argv(int *argc, char ***argv)
+{
+    int i, n = 0;
+    for (i = 0; i < *argc; i++) {
+	if ((*argv)[i] == NULL) {
+	    return -1;
+	}
+	if (bu_strcmp((*argv)[i], "#EMPTY") == 0) {
+	    (*argv)[i] = "";
+	    n++;
+	}
+    }
+    /* sanity */
+    if ((*argv)[*argc] != NULL) {
+	return -1;
+    }
+    return n;
+}
 
+
 /*
  * Local Variables:
  * mode: C
Index: src/libbu/tests/bitv-tests.cmake
===================================================================
--- src/libbu/tests/bitv-tests.cmake	(revision 63699)
+++ src/libbu/tests/bitv-tests.cmake	(working copy)
@@ -78,13 +78,11 @@
 add_test(bu_binstr_to_hexstr_test1 tester_bu_bitv 13        " 0011"    "03")
 add_test(bu_binstr_to_hexstr_test2 tester_bu_bitv 13   "0b0000011 "  "0x03")
 add_test(bu_binstr_to_hexstr_test3 tester_bu_bitv 13   "0b000 0011"  "0x03")
+add_test(bu_binstr_to_hexstr_test4 tester_bu_bitv 13       "#EMPTY"    "00")
 add_test(bu_binstr_to_hexstr_test5 tester_bu_bitv 13           "0b"  "0x00")
 add_test(bu_binstr_to_hexstr_test6 tester_bu_bitv 13   "0b000_0011"  "0x03")
 add_test(bu_binstr_to_hexstr_test7 tester_bu_bitv 13   "0b000|0011"  "0x03")
 
-# args: function number, expected hex string - tests null input case
-add_test(bu_binstr_to_hexstr_test4 tester_bu_bitv 14                   "00")
-
 # some tests are expected to fail:
 set_tests_properties(
   bu_binary_to_bitv_07
Index: src/libbu/tests/bu_bitv.c
===================================================================
--- src/libbu/tests/bu_bitv.c	(revision 63699)
+++ src/libbu/tests/bu_bitv.c	(working copy)
@@ -772,44 +772,7 @@
     return test_results;
 }
 
-
 static int
-test_bu_binstr_to_hexstr_empty_input(int argc, char **argv)
-{
-    /*         argv[1]    ""                    argv[2]
-     * inputs: <func num> <input binary string> <expected hex string>
-     */
-    int test_results = CTEST_FAIL;
-    const char *input = "";
-    const char *expected;
-    struct bu_vls v = BU_VLS_INIT_ZERO;
-
-    if (argc < 3)
-	bu_exit(1, "ERROR: input format: function_num function_test_args [%s]\n", argv[0]);
-
-    expected = argv[2];
-
-    bu_binstr_to_hexstr(input, &v);
-
-    if (BU_STR_EQUAL(expected, bu_vls_cstr(&v))) {
-	test_results = CTEST_PASS;
-	printf("\nbu_binstr_to_hexstr PASSED");
-    } else {
-	test_results = CTEST_FAIL;
-	printf("\nbu_binstr_to_hexstr FAILED");
-    }
-
-    printf("\n  Input:    '%s'", input);
-    printf("\n  Output:   '%s'", bu_vls_cstr(&v));
-    printf("\n  Expected: '%s'", expected);
-
-    bu_vls_free(&v);
-
-    return test_results;
-}
-
-
-static int
 test_bu_hexstr_to_binstr(int argc, char **argv)
 {
     /*         argv[1]    argv[2]            argv[3]
@@ -854,6 +817,8 @@
 	bu_exit(1, "ERROR: input format is function_num function_test_args [%s]\n", argv[0]);
     }
 
+    if (bu_test_argv(&argc, &argv) < 0) { bu_exit(1, "ERROR: error parsing args.\n"); }
+
     sscanf(argv[1], "%d", &function_num);
 
     switch (function_num) {
@@ -898,8 +863,6 @@
 	    break;
         case 13:
 	    return test_bu_binstr_to_hexstr(argc, argv);
-	case 14:
-	    return test_bu_binstr_to_hexstr_empty_input(argc, argv);
 	    break;
 
     }
