changed package name from 'fern' to 'shed'
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user