changed package name from 'fern' to 'shed'

This commit is contained in:
2026-02-24 18:02:13 -05:00
parent 03a435c03f
commit e6242c4d8a
17 changed files with 130 additions and 130 deletions

View File

@@ -11,7 +11,7 @@ use crate::{
linebuf::LineBuf,
term::{raw_mode, KeyReader, LineWriter},
vimode::{ViInsert, ViMode, ViNormal},
FernVi,
ShedVi,
},
};
@@ -180,11 +180,11 @@ impl LineWriter for TestWriter {
}
}
// NOTE: FernVi structure has changed significantly and readline() method no
// NOTE: ShedVi structure has changed significantly and readline() method no
// longer exists These test helpers are disabled until they can be properly
// updated
/*
impl FernVi {
impl ShedVi {
pub fn new_test(prompt: Option<String>, input: &str, initial: &str) -> Self {
Self {
reader: Box::new(TestReader::new().with_initial(input.as_bytes())),
@@ -200,10 +200,10 @@ impl FernVi {
}
}
fn fernvi_test(input: &str, initial: &str) -> String {
let mut fernvi = FernVi::new_test(None, input, initial);
fn shedvi_test(input: &str, initial: &str) -> String {
let mut shedvi = ShedVi::new_test(None, input, initial);
let raw_mode = raw_mode();
let line = fernvi.readline().unwrap();
let line = shedvi.readline().unwrap();
std::mem::drop(raw_mode);
line
}
@@ -642,24 +642,24 @@ fn editor_f_char_from_position_zero() {
);
}
// NOTE: These tests disabled because fernvi_test() helper is commented out
// NOTE: These tests disabled because shedvi_test() helper is commented out
/*
#[test]
fn fernvi_test_simple() {
assert_eq!(fernvi_test("foo bar\x1bbdw\r", ""), "foo ")
fn shedvi_test_simple() {
assert_eq!(shedvi_test("foo bar\x1bbdw\r", ""), "foo ")
}
#[test]
fn fernvi_test_mode_change() {
fn shedvi_test_mode_change() {
assert_eq!(
fernvi_test("foo bar biz buzz\x1bbbb2cwbiz buzz bar\r", ""),
shedvi_test("foo bar biz buzz\x1bbbb2cwbiz buzz bar\r", ""),
"foo biz buzz bar buzz"
)
}
#[test]
fn fernvi_test_lorem_ipsum_1() {
assert_eq!(fernvi_test(
fn shedvi_test_lorem_ipsum_1() {
assert_eq!(shedvi_test(
"\x1bwwwwwwww5dWdBdBjjdwjdwbbbcwasdasdasdasd\x1b\r",
LOREM_IPSUM),
"Lorem ipsum dolor sit amet, incididunt ut labore et dolore magna aliqua.\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in repin voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nExcepteur asdasdasdasd occaecat cupinon proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nCurabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra."
@@ -667,9 +667,9 @@ fn fernvi_test_lorem_ipsum_1() {
}
#[test]
fn fernvi_test_lorem_ipsum_undo() {
fn shedvi_test_lorem_ipsum_undo() {
assert_eq!(
fernvi_test(
shedvi_test(
"\x1bwwwwwwwwainserting some characters now...\x1bu\r",
LOREM_IPSUM
),
@@ -678,8 +678,8 @@ fn fernvi_test_lorem_ipsum_undo() {
}
#[test]
fn fernvi_test_lorem_ipsum_ctrl_w() {
assert_eq!(fernvi_test(
fn shedvi_test_lorem_ipsum_ctrl_w() {
assert_eq!(shedvi_test(
"\x1bj5wiasdasdkjhaksjdhkajshd\x17wordswordswords\x17somemorewords\x17\x1b[D\x1b[D\x17\x1b\r",
LOREM_IPSUM),
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\nUt enim ad minim am, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nCurabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra."

View File

@@ -4,25 +4,25 @@ use pretty_assertions::assert_eq;
use super::super::*;
fn get_script_output(name: &str, args: &[&str]) -> Output {
// Resolve the path to the fern binary.
// Resolve the path to the shed binary.
// Do not question me.
let mut fern_path = env::current_exe().expect("Failed to get test executable"); // The path to the test executable
fern_path.pop(); // Hocus pocus
fern_path.pop();
fern_path.push("fern"); // Abra Kadabra
let mut shed_path = env::current_exe().expect("Failed to get test executable"); // The path to the test executable
shed_path.pop(); // Hocus pocus
shed_path.pop();
shed_path.push("shed"); // Abra Kadabra
if !fern_path.is_file() {
fern_path.pop();
fern_path.pop();
fern_path.push("release");
fern_path.push("fern");
if !shed_path.is_file() {
shed_path.pop();
shed_path.pop();
shed_path.push("release");
shed_path.push("shed");
}
if !fern_path.is_file() {
if !shed_path.is_file() {
panic!("where the hell is the binary")
}
process::Command::new(fern_path) // Alakazam
process::Command::new(shed_path) // Alakazam
.arg(name)
.args(args)
.output()