-int main() {
- test_reverse_twice_from_files_is_the_same();
- test_reverse_from_file_then_from_stream_is_the_same();
+int main(int argc, char** argv) {
+ char* test_filename = "reverse.c";
+ if (argc > 2) {
+ errx(EX_USAGE, "usage: reverse_test [datafile]");
+ } else if (argc == 2) {
+ test_filename = argv[1];
+ }
+
+ test_reverse_twice_from_files_is_the_same(test_filename);
+ test_reverse_from_file_then_from_stream_is_the_same(test_filename);
+