App-mdee
view release on metacpan or search on metacpan
t/01_mdee.t view on Meta::CPAN
# Test: combined execution (fold + table)
subtest 'combined execution' => sub {
my $out = `$mdee --no-nup --fold --table --width=60 $test_md 2>&1`;
is($?, 0, 'mdee with fold+table exits successfully');
like($out, qr/\e\[/, 'output contains ANSI escape sequences');
# Both table formatting and text should be present
like($out, qr/greple.*Pattern matching/s, 'table content is present');
};
# Test: show option (verify actual output behavior)
subtest 'show option' => sub {
# Helper: check if text has ANSI color directly applied
# Markers and content may be colored separately (emphasis_mark),
# so match ANSI before either the marker or the content.
sub has_ansi_around {
my ($out, $text) = @_;
return $out =~ /\e\[[0-9;]*m\Q$text\E/;
}
sub has_bold_coloring {
my ($out) = @_;
| greple | Pattern matching | 10.04 |
| ansifold | Text folding | 2.26 |
| ansicolumn | Column formatting | 1.44 |
| nup | Multi-column output | 0.22 |
## Lists
- First item with `inline code` and a description long enough to demonstrate line folding behavior when the terminal width is narrower than the text content
- Second item with **bold** and *italic* and ***bold italic*** combined in a single line that also extends beyond the typical display width to show proper indentation after wrapping
- Third item with a [link](https://example.com) and `code` and ~~strikethrough~~ mixed together in a line that should definitely wrap at some point
- Nested item with a longer description to verify that nested list indentation is preserved correctly when ansifold wraps the text at the configured width
- Another nested item
1. Numbered list item with enough text to demonstrate that numbered list markers are handled correctly during the folding process and indentation is maintained
2. With **emphasis** and [links](https://example.com) and `inline code` all in one long line
3. Third numbered item
## Definition Lists
greple
: A pattern matching and highlighting tool with extensive regex support for syntax highlighting, used as the core engine for **mdee** Markdown rendering
( run in 0.713 second using v1.01-cache-2.11-cpan-e1769b4cff6 )