diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 1d4000b87..a39b2387b 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -804,7 +804,7 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char } else if (!strcmp(sw, "+librescan")) { // NOP } else if (!strcmp(sw, "+notimingchecks")) { // NOP } else { - fl->v3fatal("Invalid Option: " << argv[i]); + fl->v3fatal("Invalid option: " << argv[i]); } shift; } @@ -1293,7 +1293,7 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char shift; addIncDirUser(parseFileArg(optdir, string(argv[i]))); } else { - fl->v3fatal("Invalid Option: " << argv[i]); + fl->v3fatal("Invalid option: " << argv[i]); } shift; } // - options diff --git a/test_regress/t/t_flag_invalid2_bad.out b/test_regress/t/t_flag_invalid2_bad.out new file mode 100644 index 000000000..e84f9a0d8 --- /dev/null +++ b/test_regress/t/t_flag_invalid2_bad.out @@ -0,0 +1 @@ +%Error: Invalid option: +invalid-plus diff --git a/test_regress/t/t_flag_invalid2_bad.pl b/test_regress/t/t_flag_invalid2_bad.pl new file mode 100755 index 000000000..42e60b698 --- /dev/null +++ b/test_regress/t/t_flag_invalid2_bad.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl +if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2003 by Wilson Snyder. This program is free software; you +# can redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. +# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 + +scenarios(vlt => 1); + +compile( + fails => 1, + verilator_flags2 => ['+invalid-plus'], + expect_filename => $Self->{golden_filename}, + ); + +ok(1); + +1; diff --git a/test_regress/t/t_flag_invalid_bad.out b/test_regress/t/t_flag_invalid_bad.out new file mode 100644 index 000000000..54d2f3d73 --- /dev/null +++ b/test_regress/t/t_flag_invalid_bad.out @@ -0,0 +1 @@ +%Error: Invalid option: --invalid-dash diff --git a/test_regress/t/t_flag_invalid_bad.pl b/test_regress/t/t_flag_invalid_bad.pl new file mode 100755 index 000000000..71aee1a28 --- /dev/null +++ b/test_regress/t/t_flag_invalid_bad.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl +if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2003 by Wilson Snyder. This program is free software; you +# can redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. +# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 + +scenarios(vlt => 1); + +compile( + fails => 1, + verilator_flags2 => ['--invalid-dash'], + expect_filename => $Self->{golden_filename}, + ); + +ok(1); + +1;