completely rewrote test suite for top level src files and all builtin files
This commit is contained in:
@@ -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}")?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user