Merge branch 'ds/reachable'
[gitweb.git] / t / test-lib-functions.sh
index 2b2181dca09089ed36d10ee8f6f67eedda8cf352..d82fac9d790b9349df908f684e61a03780ac58c8 100644 (file)
@@ -42,6 +42,8 @@ test_decode_color () {
                function name(n) {
                        if (n == 0) return "RESET";
                        if (n == 1) return "BOLD";
+                       if (n == 2) return "FAINT";
+                       if (n == 3) return "ITALIC";
                        if (n == 7) return "REVERSE";
                        if (n == 30) return "BLACK";
                        if (n == 31) return "RED";
@@ -565,6 +567,14 @@ test_path_is_dir () {
        fi
 }
 
+test_path_exists () {
+       if ! test -e "$1"
+       then
+               echo "Path $1 doesn't exist. $2"
+               false
+       fi
+}
+
 # Check if the directory exists and is empty as expected, barf otherwise.
 test_dir_is_empty () {
        test_path_is_dir "$1" &&