5330eaf5d371 — Duncan Ross Palmer 1 year, 2 months ago
Test syntax() method
1 files changed, 10 insertions(+), 1 deletions(-)

M t/raw2c.pl
M t/raw2c.pl +10 -1
@@ 10,12 10,21 @@ use Test::Output;
 require '../bin/raw2c';
 
 sub main {
-	plan tests => 1;
+	plan tests => 2;
 
 	my $sut = Main->new();
 
 	stdout_is { $sut->title() } "raw2c by Duncan Ross Palmer\n", 'title';
 
+	stdout_is { $sut->syntax() }
+		"Syntax: [-q] [-n] [--symbol=__symbol] <binary_file> <source_file>[.c]\n" .
+		"-q disables non-critical output\n" .
+		"-n adds a NULL terminator\n" .
+		"--symbol The string following this is the public symbol for the image, else it is random\n" .
+		"binary_file is a file such as a JPEG or executable image, it may even be source\n" .
+		"source_file is a new C file to write which will contain the binary as a raw array.\n"
+	, 'syntax';
+
 	return EXIT_SUCCESS;
 }