⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 56_editfiles.t

📁 Verilog Parser in Perl
💻 T
字号:
#!/usr/bin/perl -w# DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package## Copyright 2007-2009 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 or the Perl Artistic License.use strict;use Test;use File::Copy;BEGIN { plan tests => 9 }BEGIN { require "t/test_utils.pl"; }BEGIN { use Verilog::EditFiles; }ok(1);{   #Editing    my $split = Verilog::EditFiles->new();    ok(1);    my $edfile = "test_dir/56_editfiles.v";    $split->edit_file	(filename => "t/56_editfiles.v",	 write_filename => $edfile,	 cb=>sub {	     my $wholefile = shift;	     $wholefile =~ s%inside_module%replaced_inside_module%mg;	     return $wholefile;	 });    ok(1);    ok(files_identical($edfile, "t/56_editfiles_edit.out"));}{    unlink (glob("test_dir/editout/*.v"));    my $split = Verilog::EditFiles->new	(program => "56_editfiles.t",	 outdir => "test_dir/editout",	 translate_synthesis => 1,	 lint_header => "// lint_checking HEADER\n",	 celldefine => 1,	 );    $split->read_and_split(glob("t/56_editfiles.v"));    ok(1);    $split->write_files();    ok(1);    ok(files_identical("test_dir/editout/a.v", "t/56_editfiles_a.out"));    ok(files_identical("test_dir/editout/b.v", "t/56_editfiles_b.out"));    $split->write_lint();    ok(1);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -