completely rewrote test suite for top level src files and all builtin files

This commit is contained in:
2026-03-06 23:42:14 -05:00
parent 42b4120055
commit b137c38e92
44 changed files with 5909 additions and 582 deletions

View File

@@ -1,13 +1,13 @@
use ariadne::Color;
use ariadne::{Color, Fmt};
use ariadne::{Report, ReportKind};
use rand::TryRng;
use yansi::Paint;
use std::cell::RefCell;
use std::collections::{HashMap, VecDeque};
use std::fmt::Display;
use crate::procio::RedirGuard;
use crate::{
libsh::term::{Style, Styled},
parse::lex::{Span, SpanSource},
prelude::*,
};
@@ -144,12 +144,13 @@ impl Note {
impl Display for Note {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let note = "note".styled(Style::Green);
let note = Fmt::fg("note", Color::Green);
let main = &self.main;
if self.depth == 0 {
writeln!(f, "{note}: {main}")?;
} else {
let bar_break = "-".styled(Style::Cyan | Style::Bold);
let bar_break = Fmt::fg("-", Color::Cyan);
let bar_break = bar_break.bold();
let indent = " ".repeat(self.depth);
writeln!(f, " {indent}{bar_break} {main}")?;
}