Index: tests/configs/.expect/usage.txt
===================================================================
--- tests/configs/.expect/usage.txt	(revision f82f07ec30baf11cb5f8e4a153505ce9d7180c63)
+++ tests/configs/.expect/usage.txt	(revision f82f07ec30baf11cb5f8e4a153505ce9d7180c63)
@@ -0,0 +1,66 @@
+No args, no errors
+Usage:
+  ./usage Test usage
+  -h, --help   print this help message
+Child status:
+IFEXITED   : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG    : 0, COREDUMP   : 0, IFSTOPPED  : 0, STOPSIG    : 0, IFCONTINUED: 0
+
+No args, with errors
+Usage:
+  ./usage Test usage
+  -h, --help   print this help message
+Child status:
+IFEXITED   : 1, EXITSTATUS : 1, IFSIGNALED : 0, TERMSIG    : 0, COREDUMP   : 0, IFSTOPPED  : 0, STOPSIG    : 1, IFCONTINUED: 0
+
+Args with short names only:
+Usage:
+  ./usage Test usage
+  -a       First arg
+  -b       Second arg
+  -c       Third arg
+  -h, --help   print this help message
+Child status:
+IFEXITED   : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG    : 0, COREDUMP   : 0, IFSTOPPED  : 0, STOPSIG    : 0, IFCONTINUED: 0
+
+Args with long names only:
+Usage:
+  ./usage Test usage
+      --AA   First arg
+      --BB   Second arg
+      --CC   Third arg
+  -h, --help   print this help message
+Child status:
+IFEXITED   : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG    : 0, COREDUMP   : 0, IFSTOPPED  : 0, STOPSIG    : 0, IFCONTINUED: 0
+
+Mix of short and long args:
+Usage:
+  ./usage Test usage
+  -a           First arg
+  -b, --BBBB   Second arg
+      --CC     Third arg
+  -h, --help   print this help message
+Child status:
+IFEXITED   : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG    : 0, COREDUMP   : 0, IFSTOPPED  : 0, STOPSIG    : 0, IFCONTINUED: 0
+
+Mix of short and long and some missing description:
+Usage:
+  ./usage Test usage
+  -a           First arg
+  -b, --BBBB
+      --CC     Third arg
+  -h, --help   print this help message
+Child status:
+IFEXITED   : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG    : 0, COREDUMP   : 0, IFSTOPPED  : 0, STOPSIG    : 0, IFCONTINUED: 0
+
+Mix of short and long and some long description:
+Usage:
+  ./usage Test usage
+  -a           First arg
+               The description has multiple lines,
+               ...for some reason
+  -b, --BBBB   12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+      --CC     Third arg
+  -h, --help   print this help message
+Child status:
+IFEXITED   : 1, EXITSTATUS : 0, IFSIGNALED : 0, TERMSIG    : 0, COREDUMP   : 0, IFSTOPPED  : 0, STOPSIG    : 0, IFCONTINUED: 0
+
Index: tests/configs/usage.cfa
===================================================================
--- tests/configs/usage.cfa	(revision f82f07ec30baf11cb5f8e4a153505ce9d7180c63)
+++ tests/configs/usage.cfa	(revision f82f07ec30baf11cb5f8e4a153505ce9d7180c63)
@@ -0,0 +1,122 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2022 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// configs/usage.cfa
+// Testing printing of usage for arguments
+//
+// Author           : Thierry Delisle
+// Created On       : Wed Oct 12 15:28:01 2022
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include <parseargs.hfa>
+#include <fstream.hfa>
+
+#include "../meta/fork+exec.hfa"
+
+int main() {
+	char * fake_argv[] = { "./usage" };
+
+	sout | "No args, no errors";
+	if(pid_t child = strict_fork(); child == 0) {
+		cfa_option opts[0];
+		print_args_usage(1, fake_argv, opts, 0, "Test usage", false);
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+
+	sout | "No args, with errors";
+	if(pid_t child = strict_fork(); child == 0) {
+		cfa_option opts[0];
+		print_args_usage(1, fake_argv, opts, 0, "Test usage", true);
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+
+	sout | "Args with short names only:";
+	if(pid_t child = strict_fork(); child == 0) {
+		int a, b, c;
+		cfa_option opts[] = {
+			{'a', "", "First arg", a },
+			{'b', "", "Second arg", b },
+			{'c', "", "Third arg", c },
+		};
+		print_args_usage(1, fake_argv, opts, 3, "Test usage", false);
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+
+	sout | "Args with long names only:";
+	if(pid_t child = strict_fork(); child == 0) {
+		int a, b, c;
+		cfa_option opts[] = {
+			{'\0', "AA", "First arg", a },
+			{'\0', "BB", "Second arg", b },
+			{'\0', "CC", "Third arg", c },
+		};
+		print_args_usage(1, fake_argv, opts, 3, "Test usage", false);
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+
+	sout | "Mix of short and long args:";
+	if(pid_t child = strict_fork(); child == 0) {
+		int a, b, c;
+		cfa_option opts[] = {
+			{'a', "", "First arg", a },
+			{'b', "BBBB", "Second arg", b },
+			{'\0', "CC", "Third arg", c },
+		};
+		print_args_usage(1, fake_argv, opts, 3, "Test usage", false);
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+
+	sout | "Mix of short and long and some missing description:";
+	if(pid_t child = strict_fork(); child == 0) {
+		int a, b, c;
+		cfa_option opts[] = {
+			{'a', "", "First arg", a },
+			{'b', "BBBB", "", b },
+			{'\0', "CC", "Third arg", c },
+		};
+		print_args_usage(1, fake_argv, opts, 3, "Test usage", false);
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+
+	sout | "Mix of short and long and some long description:";
+	if(pid_t child = strict_fork(); child == 0) {
+		int a, b, c;
+		cfa_option opts[] = {
+			{'a', "", "First arg\nThe description has multiple lines,\n...for some reason", a },
+			{'b', "BBBB", "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", b },
+			{'\0', "CC", "Third arg", c },
+		};
+		print_args_usage(1, fake_argv, opts, 3, "Test usage", false);
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+}
+
+// no used
+static int true_main(const char * path, char * env[]) { return 0; }
