Debian Codegraph @

t/51_vrename_kwd.t

raw symbols SCIP
1 #!/usr/bin/perl -w
2 # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package
3 #
4 # Copyright 2000-2024 by Wilson Snyder. This program is free software;
5 # you can redistribute it and/or modify it under the terms of either the GNU
6 # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
7
8 use strictscip-perl cpan Verilog-Perl 3.482 strict/;
9 use Test::Morescip-perl cpan Verilog-Perl 3.482 Test/More/;
10
11 BEGIN { planscip-perl cpan Verilog-Perl 3.482 main/plan(). tests => 6 }
12 BEGIN { requirescip-perl cpan Verilog-Perl 3.482 main/require(). "./t/test_utils.pl"; }
13
14 printscip-perl cpan Verilog-Perl 3.482 main/print(). "Checking vrename...\n";
15 my $changefile = "test_dir/51_vrename_kwd_list.vrename";
16 {
17 # -List
18 my $cmd = "${PERL} ./vrename -changefile=$changefile -list --changelang --language 1364-1995 t/51_vrename_kwd.v";
19 run_systemscip-perl cpan Verilog-Perl 3.482 main/run_system(). ($cmd);
20 okscip-perl cpan Verilog-Perl 3.482 main/ok().(1, "vrename list");
21 okscip-perl cpan Verilog-Perl 3.482 main/ok().(files_identicalscip-perl cpan Verilog-Perl 3.482 main/files_identical().($changefile, "t/51_vrename_kwd_list.out"), "diff");
22 }
23
24 {
25 # Try renaming - no change
26 mkdirscip-perl cpan Verilog-Perl 3.482 main/mkdir(). 'test_dir/t', 0777;
27 my $cmd = ("${PERL} ./vrename -change --changefile=$changefile"
28 ." -o test_dir t/51_vrename_kwd.v");
29 run_systemscip-perl cpan Verilog-Perl 3.482 main/run_system(). ($cmd);
30 okscip-perl cpan Verilog-Perl 3.482 main/ok().(1, "vrename change same");
31 okscip-perl cpan Verilog-Perl 3.482 main/ok().(files_identicalscip-perl cpan Verilog-Perl 3.482 main/files_identical().("test_dir/t/51_vrename_kwd.v", "t/51_vrename_kwd_chg.out"), "diff");
32 }
33
34 {
35 # Try renaming - with change
36 mkdirscip-perl cpan Verilog-Perl 3.482 main/mkdir(). 'test_dir/t', 0777;
37 my $cmd = ("${PERL} ./vrename -change --changefile=t/51_vrename_kwd_chg2.vrename"
38 ." -o test_dir t/51_vrename_kwd.v");
39 run_systemscip-perl cpan Verilog-Perl 3.482 main/run_system(). ($cmd);
40 okscip-perl cpan Verilog-Perl 3.482 main/ok().(1, "vrename change");
41 okscip-perl cpan Verilog-Perl 3.482 main/ok().(files_identicalscip-perl cpan Verilog-Perl 3.482 main/files_identical().("test_dir/t/51_vrename_kwd.v", "t/51_vrename_kwd_chg2.out"), "diff");
42 }