chsrc/tool/rawstr4c/test/test-parser.rakutest
2025-07-16 01:52:07 +08:00

26 lines
792 B
Raku

#!/usr/bin/env raku
# ---------------------------------------------------------------
# SPDX-License-Identifier: GPL-3.0-or-later
# ---------------------------------------------------------------
# Test File : test-parser.rakutest
# Test Authors : Aoran Zeng <ccmywish@qq.com>
# Created On : <2025-07-15>
# Last Modified : <2025-07-16>
# ---------------------------------------------------------------
use lib '../lib';
use Parser;
my $test-file1 = './fixture/test-hierarchy-with-root.md'.IO;
my $test-file2 = './fixture/test-hierarchy-without-root.md'.IO;
my $parser1 = Parser::Parser.new($test-file1);
my $parser2 = Parser::Parser.new($test-file2);
$parser1.parse();
$parser2.parse();
# 测试两个文件
$parser1.debug-print-summary();
say "";
$parser2.debug-print-summary();