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

30 lines
836 B
Raku

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