Index: src/libbu/tests/CMakeLists.txt
===================================================================
--- src/libbu/tests/CMakeLists.txt	(revision 59124)
+++ src/libbu/tests/CMakeLists.txt	(working copy)
@@ -401,60 +401,159 @@
 
 add_test(bu_vls_access_1 tester_bu_vls 3 "Test 1 2 3")
 
-# For function #4 (bu_vls_strdup) the <args> format is as follwos:
+# For function #4 (bu_vls_strncpy) the <args> format is as follwos:
 #
+# string_orig string_new n expected_result
+#
+# where string_new will be put into the vls via strncpy() after
+# string_new is put in with strcpy(); n is the n given to strncpy()
+
+add_test(bu_vls_strncpy_1 tester_bu_vls 4 "Test 1" "Test 1 2" 4 "Test")
+add_test(bu_vls_strncpy_2 tester_bu_vls 4 "Test 1" "Test 1 2" 8 "Test 1 2")
+
+# For function #5 (bu_vls_strdup) the <args> format is as follwos:
+#
 # string_to_test
 #
 # where string_to_test is a string to be used in testing bu_vls_strdup.
 
-add_test(bu_vls_strdup_1 tester_bu_vls 4 "Test 1 2 3")
+add_test(bu_vls_strdup_1 tester_bu_vls 5 "Test 1 2 3")
 
-# For function #5 (bu_vls_strlen) the <args> format is as follows:
+# For function #6 (bu_vls_strlen) the <args> format is as follows:
 #
 # string_to_test
 #
 # where string_to_test is a string whose length will be checked
 
-add_test(bu_vls_strlen_1 tester_bu_vls 5 "Test 1 2 3")
+add_test(bu_vls_strlen_1 tester_bu_vls 6 "Test 1 2 3")
 
-# For function #6 (bu_vls_trunc) the <args> format is as follows:
+# For function #7 (bu_vls_trunc) the <args> format is as follows:
 #
 # string_to_test trunc_len expected_result
 #
 # where string_to_test is the string which will be truncated, and
 # trunc_len is the length that will be used for truncation.
 
-add_test(bu_vls_trunc_1 tester_bu_vls 6 "Test 1 2 3" 6 "Test 1")
-add_test(bu_vls_trunc_2 tester_bu_vls 6 "Test 1 2 3" -2 "Test 1 2")
+add_test(bu_vls_trunc_1 tester_bu_vls 7 "Test 1 2 3" 6 "Test 1")
+add_test(bu_vls_trunc_2 tester_bu_vls 7 "Test 1 2 3" -2 "Test 1 2")
 
-# For function #7 (bu_vls_trunc2) the <args> format is as follows:
+# For function #8 (bu_vls_trunc2) the <args> format is as follows:
 #
 # string_to_test trunc_len expected_result
 #
 # where string_to_test is the string which will be truncated, and
 # trunc_len is the length that will be used for truncation.
 
-add_test(bu_vls_trunc2_1 tester_bu_vls 7 "Test 1 2 3" 6 "Test 1")
-add_test(bu_vls_trunc2_2 tester_bu_vls 7 "Test 1 2 3" -2 "Test 1 2 3")
+add_test(bu_vls_trunc2_1 tester_bu_vls 8 "Test 1 2 3" 6 "Test 1")
+add_test(bu_vls_trunc2_2 tester_bu_vls 8 "Test 1 2 3" -2 "Test 1 2 3")
 
-# For function #8 (bu_vls_nibble) the <args> format is as follows:
+# For function #9 (bu_vls_nibble) the <args> format is as follows:
 #
 # string_to_test nibble_len expected_result
 #
 # where string_to_test is the string which will be nibbled, and
 # nibble_len is the length that will be nibbled.
 
-add_test(bu_vls_nibble_1 tester_bu_vls 8 "Test 1 2 3" 4 " 1 2 3")
+add_test(bu_vls_nibble_1 tester_bu_vls 9 "Test 1 2 3" 4 " 1 2 3")
 
-# For function #9 (bu_vls_strcat) the <args> format is as follows:
+# For function #10 (bu_vls_strcat) the <args> format is as follows:
 #
 # string1 string2 expected_result
 #
 # where string1 and string2 will be concatenated.
 
-add_test(bu_vls_strcat_1 tester_bu_vls 9 "Test 1" " 2 3" "Test 1 2 3")
+add_test(bu_vls_strcat_1 tester_bu_vls 10 "Test 1" " 2 3" "Test 1 2 3")
 
+# For function #11 (bu_vls_strncat) the <args> format is as follows:
 #
+# string1 string2 n expected_result
+#
+# where string1 and string2 will be concatenated.
+
+add_test(bu_vls_strncat_1 tester_bu_vls 11 "Test 1" " 2 3" 4 "Test 1 2 3")
+add_test(bu_vls_strncat_2 tester_bu_vls 11 "Test 1" " 2 3" 2 "Test 1 2")
+# This seems to be failing because a if() statement in strncat thinks
+# that 4 is not greater than -4, so len is left at strlen(" 2 3")
+add_test(bu_vls_strncat_3 tester_bu_vls 11 "Test 1" " 2 3" -4 "Test 1")
+
+# For function #12 (bu_vls_vlscat) the <args> format is as follows:
+#
+# string1 string2 expected_result
+#
+# where string1 and string2 will be concatenated via bu_vls_vlscat.
+
+add_test(bu_vls_vlscat_1 tester_bu_vls 12 "Test 1" " 2 3" "Test 1 2 3")
+
+# For function #13 (bu_vls_strcmp) the <args> format is as follows:
+#
+# string1 string2 expected_result
+#
+# where string1 and string2 will be compared via bu_vls_strcmp.
+
+add_test(bu_vls_strcmp_equal_1   tester_bu_vls 13 "Test 1" "Test 1" 0)
+add_test(bu_vls_strcmp_lesser_1  tester_bu_vls 13 "Test 1" "Test 2" -1)
+add_test(bu_vls_strcmp_greater_1 tester_bu_vls 13 "Test 1" "Test 0" 1)
+
+# For function #14 (bu_vls_strcmp) the <args> format is as follows:
+#
+# string1 string2 expected_result
+#
+# where string1 and string2 will be concatenated via bu_vls_vlscat.
+
+add_test(bu_vls_strncmp_equal_1   tester_bu_vls 14 "Test 1" "Test 1" 6 0)
+add_test(bu_vls_strncmp_lesser_1  tester_bu_vls 14 "Test 1" "Test 2" 6 -1)
+add_test(bu_vls_strncmp_greater_1 tester_bu_vls 14 "Test 1" "Test 0" 6 1)
+add_test(bu_vls_strncmp_equal_2   tester_bu_vls 14 "Test 1" "Test 1" 4 0)
+add_test(bu_vls_strncmp_equal_3   tester_bu_vls 14 "Test 1" "Test 2" 4 0)
+add_test(bu_vls_strncmp_equal_4   tester_bu_vls 14 "Test 1" "Test 0" 4 0)
+
+# For function #15 (bu_vls_from_argv) the <args> format is as follows:
+#
+# strings expected_result
+#
+# where strings will be recreated via bu_vls_from_argv, and the
+# recreation will be checked against expected_result
+
+add_test(bu_vls_from_argv_1 tester_bu_vls 15 Test Test 2 3 4 "Test Test 2 3 4")
+
+# For function #16 (bu_vls_trimspace) the <args> format is as follows:
+#
+# string expected_result
+#
+# where string will have spaces trimmed, and the result will be
+# compared with expected_result
+
+add_test(bu_vls_trimspace_1 tester_bu_vls 16 "   Testing1 2   " "Testing1 2")
+
+# For function #17 (bu_vls_spaces) the <args> format is as follows:
+#
+# string num_spaces expected_result
+#
+# where string will have num_spaces appended, and the result will be
+# checked against expected_result
+
+add_test(bu_vls_spaces_1 tester_bu_vls 17 "Testing1 2" 3 "Testing1 2   ")
+
+# For function #18 (bu_vls_detab) the <args> format is as follows:
+#
+# string expected_result
+#
+# where string will have tabs replaced, and the result will be checked
+# against expected_result
+
+add_test(bu_vls_detab_1 tester_bu_vls 18 "Testing	1 2	3" "Testing 1 2     3")
+
+# For function #19 (bu_vls_prepend) the <args> format is as follows:
+#
+# string string_to_prepend expected_result
+#
+# where string_to_prepend will be prepended to string, and the result
+# will be checked against expected_result
+
+add_test(bu_vls_prepend_1 tester_bu_vls 19 "2 3" "Test 1 " "Test 1 2 3")
+
+
+#
 #  ************ sort.c test *************
 #
 BRLCAD_ADDEXEC(tester_bu_sort bu_sort.c libbu NO_INSTALL)
Index: src/libbu/tests/bu_vls.c
===================================================================
--- src/libbu/tests/bu_vls.c	(revision 59124)
+++ src/libbu/tests/bu_vls.c	(working copy)
@@ -29,9 +29,11 @@
 #include "./vls_internals.h"
 
 /* This prints out the values of the expected vls and compares it with
-the actual vls; it uses the C-style return values of 0 for false and 1
-for true */
-static int compare_vls(struct bu_vls *actual_vls, struct bu_vls *expected_vls)
+ * the actual vls; it uses the C-style return values of 0 for false and 1
+ * for true
+ */
+static int
+compare_vls(struct bu_vls *actual_vls, struct bu_vls *expected_vls)
 {
     bu_log("magic: %lu", (unsigned long)expected_vls->vls_magic);
     bu_log("str: %s", expected_vls->vls_str);
@@ -43,7 +45,8 @@
 	    && bu_vls_strcmp(expected_vls, actual_vls) == 0);
 }
 
-static int test_bu_vls_init()
+static int
+test_bu_vls_init()
 {
     struct bu_vls expected_vls = { BU_VLS_MAGIC, (char *)0, 0, 0, 0 };
     struct bu_vls actual_vls;
@@ -51,11 +54,13 @@
     bu_vls_init(&actual_vls);
 
     /* These functions need to return sh-style return values where
-       non-zero is false and zero is true */
+     * non-zero is false and zero is true
+     */
     return !compare_vls(&actual_vls, &expected_vls);
 }
 
-static int test_bu_vls_vlsinit()
+static int
+test_bu_vls_vlsinit()
 {
     struct bu_vls expected_vls = { BU_VLS_MAGIC, (char *)0, 0, 0, 0 };
     struct bu_vls *actual_vls;
@@ -64,22 +69,24 @@
     actual_vls = bu_vls_vlsinit();
 
     /* These functions need to return sh-style return values where
-       non-zero is false and zero is true */
+     * non-zero is false and zero is true
+     */
     retval = !compare_vls(actual_vls, &expected_vls);
 
-    bu_vls_vlsfree(actual_vls);
+    bu_vls_free(actual_vls);
 
     return retval;
 }
 
-static int test_bu_vls_access(int argc, char *argv[])
+static int
+test_bu_vls_access(int argc, char *argv[])
 {
     char *null_expected_string = '\0';
     char *null_actual_string;
 
     char *set_expected_string;
     char *set_actual_addr_string;
-    struct bu_vls *vls;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
     int retval;
 
     if (argc != 3) {
@@ -88,30 +95,68 @@
 
     set_expected_string = argv[2];
 
-    vls = bu_vls_vlsinit();
+    null_actual_string = bu_vls_addr(&vls);
+    bu_vls_strcpy(&vls, set_expected_string);
+    set_actual_addr_string = bu_vls_addr(&vls);
 
-    null_actual_string = bu_vls_addr(vls);
-    bu_vls_strcpy(vls, set_expected_string);
-    set_actual_addr_string = bu_vls_addr(vls);
-
     printf("Actual null: %s\n", null_actual_string);
     printf("Actual addr_string (set): %s\n", set_actual_addr_string);
 
     /* These functions need to return sh-style return values where
-       non-zero is false and zero is true */
+     * non-zero is false and zero is true
+     */
     retval = !(bu_strcmp(null_actual_string, null_expected_string) == 0
 	       && bu_strcmp(set_actual_addr_string, set_expected_string) == 0);
 
-    bu_vls_vlsfree(vls);
+    bu_vls_free(&vls);
 
     return retval;
 }
 
-static int test_bu_vls_strdup(int argc, char *argv[])
+static int
+test_bu_vls_strncpy(int argc, char *argv[])
 {
+    char *expected_result_string;
+    char *actual_result_string;
+    int actual_result_len;
+    char *string_orig;
+    char *string_new;
+    int n;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
+
+    if (argc != 6) {
+	bu_exit(1, "ERROR: input format is string_orig string_new n expected_result [%s]\n", argv[0]);
+    }
+
+    string_orig = argv[2];
+    string_new = argv[3];
+    sscanf(argv[4], "%d", &n);
+    expected_result_string = argv[5];
+
+    bu_vls_strcpy(&vls, string_orig);
+    bu_vls_strncpy(&vls, string_new, n);
+
+    actual_result_string = bu_vls_strdup(&vls);
+    actual_result_len = bu_vls_strlen(&vls);
+
+    printf("Result: %s\n", actual_result_string);
+    printf("Result len: %d\n", actual_result_len);
+
+    bu_vls_free(&vls);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true
+     */
+    return !(bu_strcmp(actual_result_string, expected_result_string) == 0
+	     && actual_result_len == n);
+}
+
+static int
+test_bu_vls_strdup(int argc, char *argv[])
+{
     char *set_expected_string;
     char *set_actual_strdup_string;
-    struct bu_vls *vls;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
     int retval;
 
     if (argc != 3) {
@@ -120,29 +165,29 @@
 
     set_expected_string = argv[2];
 
-    vls = bu_vls_vlsinit();
+    bu_vls_strcpy(&vls, set_expected_string);
+    set_actual_strdup_string = bu_vls_strdup(&vls);
 
-    bu_vls_strcpy(vls, set_expected_string);
-    set_actual_strdup_string = bu_vls_strdup(vls);
-
     printf("Actual strdup_string (before free): %s\n", set_actual_strdup_string);
     retval = bu_strcmp(set_actual_strdup_string, set_expected_string) == 0;
 
-    bu_vls_vlsfree(vls);
+    bu_vls_free(&vls);
     printf("Actual strdup_string (after free): %s\n", set_actual_strdup_string);
     retval = retval && bu_strcmp(set_actual_strdup_string, set_expected_string) == 0;
 
     /* These functions need to return sh-style return values where
-       non-zero is false and zero is true */
+     * non-zero is false and zero is true
+     */
     return !retval;
 }
 
-static int test_bu_vls_strlen(int argc, char *argv[])
+static int
+test_bu_vls_strlen(int argc, char *argv[])
 {
     char *string;
     int expected_length;
     int actual_length;
-    struct bu_vls *vls;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
 
     if (argc != 3) {
 	bu_exit(1, "ERROR: input format is string_to_test [%s]\n", argv[0]);
@@ -151,25 +196,25 @@
     string = argv[2];
     expected_length = strlen(string);
 
-    vls = bu_vls_vlsinit();
+    bu_vls_strcpy(&vls, string);
+    actual_length = bu_vls_strlen(&vls);
 
-    bu_vls_strcpy(vls, string);
-    actual_length = bu_vls_strlen(vls);
+    bu_vls_free(&vls);
 
-    bu_vls_vlsfree(vls);
-
     /* These functions need to return sh-style return values where
-       non-zero is false and zero is true */
+     * non-zero is false and zero is true
+     */
     return !(expected_length == actual_length);
 }
 
-static int test_bu_vls_trunc(int argc, char *argv[])
+static int
+test_bu_vls_trunc(int argc, char *argv[])
 {
     char *in_string;
     int trunc_len;
     char *expected_out_string;
     char *actual_out_string;
-    struct bu_vls *vls;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
 
     if (argc != 5) {
 	bu_exit(1, "ERROR: input format is string_to_test trunc_len expected_result[%s]\n", argv[0]);
@@ -179,29 +224,29 @@
     sscanf(argv[3], "%d", &trunc_len);
     expected_out_string = argv[4];
 
-    vls = bu_vls_vlsinit();
+    bu_vls_strcpy(&vls, in_string);
+    bu_vls_trunc(&vls, trunc_len);
+    actual_out_string = bu_vls_strdup(&vls);
 
-    bu_vls_strcpy(vls, in_string);
-    bu_vls_trunc(vls, trunc_len);
-    actual_out_string = bu_vls_strdup(vls);
-
     printf("trunc_len: %d\n", trunc_len);
     printf("Result: %s\n", actual_out_string);
 
-    bu_vls_vlsfree(vls);
+    bu_vls_free(&vls);
 
     /* These functions need to return sh-style return values where
-       non-zero is false and zero is true */
+     * non-zero is false and zero is true
+     */
     return !(bu_strcmp(actual_out_string, expected_out_string) == 0);
 }
 
-static int test_bu_vls_trunc2(int argc, char *argv[])
+static int
+test_bu_vls_trunc2(int argc, char *argv[])
 {
     char *in_string;
     int trunc_len;
     char *expected_out_string;
     char *actual_out_string;
-    struct bu_vls *vls;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
 
     if (argc != 5) {
 	bu_exit(1, "ERROR: input format is string_to_test trunc_len expected_result[%s]\n", argv[0]);
@@ -211,18 +256,17 @@
     sscanf(argv[3], "%d", &trunc_len);
     expected_out_string = argv[4];
 
-    vls = bu_vls_vlsinit();
+    bu_vls_strcpy(&vls, in_string);
+    bu_vls_trunc2(&vls, trunc_len);
+    actual_out_string = bu_vls_strdup(&vls);
 
-    bu_vls_strcpy(vls, in_string);
-    bu_vls_trunc2(vls, trunc_len);
-    actual_out_string = bu_vls_strdup(vls);
-
     printf("Result: %s\n", actual_out_string);
 
-    bu_vls_vlsfree(vls);
+    bu_vls_free(&vls);
 
     /* These functions need to return sh-style return values where
-       non-zero is false and zero is true */
+     * non-zero is false and zero is true
+     */
     return !(bu_strcmp(actual_out_string, expected_out_string) == 0);
 }
 
@@ -232,7 +276,7 @@
     int nibble_len;
     char *expected_out_string;
     char *actual_out_string;
-    struct bu_vls *vls;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
 
     if (argc != 5) {
 	bu_exit(1, "ERROR: input format is string_to_test nibble_len expected_result[%s]\n", argv[0]);
@@ -242,18 +286,17 @@
     sscanf(argv[3], "%d", &nibble_len);
     expected_out_string = argv[4];
 
-    vls = bu_vls_vlsinit();
+    bu_vls_strcpy(&vls, in_string);
+    bu_vls_nibble(&vls, nibble_len);
+    actual_out_string = bu_vls_strdup(&vls);
 
-    bu_vls_strcpy(vls, in_string);
-    bu_vls_nibble(vls, nibble_len);
-    actual_out_string = bu_vls_strdup(vls);
-
     printf("Result: %s\n", actual_out_string);
 
-    bu_vls_vlsfree(vls);
+    bu_vls_free(&vls);
 
     /* These functions need to return sh-style return values where
-       non-zero is false and zero is true */
+     * non-zero is false and zero is true
+     */
     return !(bu_strcmp(actual_out_string, expected_out_string) == 0);
 }
 
@@ -263,7 +306,7 @@
     char *in_string_2;
     char *expected_out_string;
     char *actual_out_string;
-    struct bu_vls *vls;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
 
     if (argc!= 5) {
 	bu_exit(1, "ERROR: input format is string1 string2 expected_result [%s]\n", argv[0]);
@@ -273,21 +316,302 @@
     in_string_2 = argv[3];
     expected_out_string = argv[4];
 
-    vls = bu_vls_vlsinit();
+    bu_vls_strcpy(&vls, in_string_1);
+    bu_vls_strcat(&vls, in_string_2);
+    actual_out_string = bu_vls_strdup(&vls);
 
-    bu_vls_strcpy(vls, in_string_1);
-    bu_vls_strcat(vls, in_string_2);
-    actual_out_string = bu_vls_strdup(vls);
+    printf("Result: %s\n", actual_out_string);
 
+    bu_vls_free(&vls);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true
+     */
+    return !(bu_strcmp(actual_out_string, expected_out_string) == 0);
+}
+
+static int test_bu_vls_strncat(int argc, char *argv[])
+{
+    char *in_string_1;
+    char *in_string_2;
+    char *expected_out_string;
+    char *actual_out_string;
+    int n;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
+
+    if (argc != 6) {
+	bu_exit(1, "ERROR: input format is string1 string2 n expected_result [%s]\n", argv[0]);
+    }
+
+    in_string_1 = argv[2];
+    in_string_2 = argv[3];
+    sscanf(argv[4], "%d", &n);
+    expected_out_string = argv[5];
+
+    bu_vls_strcpy(&vls, in_string_1);
+    bu_vls_strncat(&vls, in_string_2, n);
+    actual_out_string = bu_vls_strdup(&vls);
+
     printf("Result: %s\n", actual_out_string);
 
-    bu_vls_vlsfree(vls);
+    bu_vls_free(&vls);
 
     /* These functions need to return sh-style return values where
-       non-zero is false and zero is true */
+     * non-zero is false and zero is true
+     */
     return !(bu_strcmp(actual_out_string, expected_out_string) == 0);
 }
 
+static int test_bu_vls_vlscat(int argc, char *argv[])
+{
+    char *in_string_1;
+    char *in_string_2;
+    char *expected_out_string;
+    char *actual_out_string;
+    struct bu_vls vls_1 = BU_VLS_INIT_ZERO;
+    struct bu_vls vls_2 = BU_VLS_INIT_ZERO;
+
+    if (argc != 5) {
+	bu_exit(1, "ERROR: input format is string1 string2 expected_result [%s]\n", argv[0]);
+    }
+
+    in_string_1 = argv[2];
+    in_string_2 = argv[3];
+    expected_out_string = argv[4];
+
+    bu_vls_strcpy(&vls_1, in_string_1);
+    bu_vls_strcpy(&vls_2, in_string_2);
+    bu_vls_vlscat(&vls_1, &vls_2);
+    actual_out_string = bu_vls_strdup(&vls_1);
+
+    printf("Result: %s\n", actual_out_string);
+
+    bu_vls_free(&vls_1);
+    bu_vls_free(&vls_2);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true
+     */
+    return !(bu_strcmp(actual_out_string, expected_out_string) == 0);
+}
+
+static int test_bu_vls_strcmp(int argc, char *argv[])
+{
+    char *in_string_1;
+    char *in_string_2;
+    int expected_result;
+    int actual_result;
+    struct bu_vls vls_1 = BU_VLS_INIT_ZERO;
+    struct bu_vls vls_2 = BU_VLS_INIT_ZERO;
+
+    if (argc != 5) {
+	bu_exit(1, "ERROR: input format is string1 string2 expected_result [%s]\n", argv[0]);
+    }
+
+    in_string_1 = argv[2];
+    in_string_2 = argv[3];
+    sscanf(argv[4], "%d", &expected_result);
+
+    bu_vls_strcpy(&vls_1, in_string_1);
+    bu_vls_strcpy(&vls_2, in_string_2);
+    actual_result = bu_vls_strcmp(&vls_1, &vls_2);
+
+    printf("Result: %d\n", actual_result);
+
+    bu_vls_free(&vls_1);
+    bu_vls_free(&vls_2);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true; the condition just checks
+     * that the expected and actual results are on the same side of 0;
+     * it currently expects expected_result to be on of -1, 0, or
+     * 1.
+     */
+    return !(abs(actual_result) == expected_result*actual_result);
+}
+
+static int test_bu_vls_strncmp(int argc, char *argv[])
+{
+    char *in_string_1;
+    char *in_string_2;
+    int n;
+    int expected_result;
+    int actual_result;
+    struct bu_vls vls_1 = BU_VLS_INIT_ZERO;
+    struct bu_vls vls_2 = BU_VLS_INIT_ZERO;
+
+    if (argc != 6) {
+	bu_exit(1, "ERROR: input format is string1 string2 n expected_result [%s]\n", argv[0]);
+    }
+
+    in_string_1 = argv[2];
+    in_string_2 = argv[3];
+    sscanf(argv[4], "%d", &n);
+    sscanf(argv[5], "%d", &expected_result);
+
+    bu_vls_strcpy(&vls_1, in_string_1);
+    bu_vls_strcpy(&vls_2, in_string_2);
+    actual_result = bu_vls_strncmp(&vls_1, &vls_2, n);
+
+    printf("Result: %d\n", actual_result);
+
+    bu_vls_free(&vls_1);
+    bu_vls_free(&vls_2);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true; the condition just checks
+     * that the expected and actual results are on the same side of 0;
+     * it currently expects expected_result to be on of -1, 0, or
+     * 1.
+     */
+    return !(abs(actual_result) == expected_result*actual_result);
+}
+
+static int test_bu_vls_from_argv(int argc, char *argv[])
+{
+    char *expected_result;
+    char *actual_result;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
+
+    if (argc < 4) {
+	bu_exit(1, "ERROR: input format is strings expected_result [%s]\n", argv[0]);
+    }
+
+    expected_result = argv[argc-1];
+
+    bu_vls_from_argv(&vls, argc-3, (const char **)argv+2);
+    actual_result = bu_vls_strdup(&vls);
+
+    printf("Result: %s\n", actual_result);
+
+    bu_vls_free(&vls);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true.
+     */
+    return !(bu_strcmp(actual_result, expected_result) == 0);
+}
+
+static int test_bu_vls_trimspace(int argc, char *argv[])
+{
+    char *in_string;
+    char *expected_result;
+    char *actual_result;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
+
+    if (argc != 4) {
+	bu_exit(1, "ERROR: input format is string expected_result [%s]\n", argv[0]);
+    }
+
+    in_string = argv[2];
+    expected_result = argv[3];
+
+    bu_vls_strcpy(&vls, in_string);
+    bu_vls_trimspace(&vls);
+
+    actual_result = bu_vls_strdup(&vls);
+
+    printf("Result: %s\n", actual_result);
+
+    bu_vls_free(&vls);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true.
+     */
+    return !(bu_strcmp(actual_result, expected_result) == 0);
+}
+
+static int test_bu_vls_spaces(int argc, char *argv[])
+{
+    char *in_string;
+    int num_spaces;
+    char *expected_result;
+    char *actual_result;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
+
+    if (argc != 5) {
+	bu_exit(1, "ERROR: input format is string num_spaces expected_result [%s]\n", argv[0]);
+    }
+
+    in_string = argv[2];
+    sscanf(argv[3], "%d", &num_spaces);
+    expected_result = argv[4];
+
+    bu_vls_strcpy(&vls, in_string);
+    bu_vls_spaces(&vls, num_spaces);
+
+    actual_result = bu_vls_strdup(&vls);
+
+    printf("Result: %s\n", actual_result);
+
+    bu_vls_free(&vls);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true.
+     */
+    return !(bu_strcmp(actual_result, expected_result) == 0);
+}
+
+static int test_bu_vls_detab(int argc, char *argv[])
+{
+    char *in_string;
+    char *expected_result;
+    char *actual_result;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
+
+    if (argc != 4) {
+	bu_exit(1, "ERROR: input format is string expected_result [%s]\n", argv[0]);
+    }
+
+    in_string = argv[2];
+    expected_result = argv[3];
+
+    bu_vls_strcpy(&vls, in_string);
+    bu_vls_detab(&vls);
+
+    actual_result = bu_vls_strdup(&vls);
+
+    printf("Result: %s\n", actual_result);
+
+    bu_vls_free(&vls);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true.
+     */
+    return !(bu_strcmp(actual_result, expected_result) == 0);
+}
+
+static int test_bu_vls_prepend(int argc, char *argv[])
+{
+    char *in_string;
+    char *prepend_string;
+    char *expected_result;
+    char *actual_result;
+    struct bu_vls vls = BU_VLS_INIT_ZERO;
+
+    if (argc != 5) {
+	bu_exit(1, "ERROR: input format is string string_to_prepend expected_result[%s]\n", argv[0]);
+    }
+
+    in_string = argv[2];
+    prepend_string=  argv[3];
+    expected_result = argv[4];
+
+    bu_vls_strcpy(&vls, in_string);
+    bu_vls_prepend(&vls, prepend_string);
+
+    actual_result = bu_vls_strdup(&vls);
+
+    printf("Result: %s\n", actual_result);
+
+    bu_vls_free(&vls);
+
+    /* These functions need to return sh-style return values where
+     * non-zero is false and zero is true.
+     */
+    return !(bu_strcmp(actual_result, expected_result) == 0);
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -302,26 +626,48 @@
     switch (function_num) {
 	case 1:
 	    /* We don't need any arguments here, as there is only one
-	       thing that bu_vls_init can do */
+	     * thing that bu_vls_init can do
+	     */
 	    return test_bu_vls_init();
 	case 2:
 	    /* We don't need any arguments here, as there is only one
-	       thing that bu_vls_init can do */
+	     * thing that bu_vls_init can do
+	     */
 	    return test_bu_vls_vlsinit();
 	case 3:
 	    return test_bu_vls_access(argc, argv);
 	case 4:
+	    return test_bu_vls_strncpy(argc, argv);
+	case 5:
 	    return test_bu_vls_strdup(argc, argv);
-	case 5:
+	case 6:
 	    return test_bu_vls_strlen(argc, argv);
-	case 6:
+	case 7:
 	    return test_bu_vls_trunc(argc, argv);
-	case 7:
+	case 8:
 	    return test_bu_vls_trunc2(argc, argv);
-	case 8:
+	case 9:
 	    return test_bu_vls_nibble(argc, argv);
-	case 9:
+	case 10:
 	    return test_bu_vls_strcat(argc, argv);
+	case 11:
+	    return test_bu_vls_strncat(argc, argv);
+	case 12:
+	    return test_bu_vls_vlscat(argc, argv);
+	case 13:
+	    return test_bu_vls_strcmp(argc, argv);
+	case 14:
+	    return test_bu_vls_strncmp(argc, argv);
+	case 15:
+	    return test_bu_vls_from_argv(argc, argv);
+	case 16:
+	    return test_bu_vls_trimspace(argc, argv);
+	case 17:
+	    return test_bu_vls_spaces(argc, argv);
+	case 18:
+	    return test_bu_vls_detab(argc, argv);
+	case 19:
+	    return test_bu_vls_prepend(argc, argv);
     }
 
     bu_log("ERROR: function_num %d is not valid [%s]\n", function_num, argv[0]);
