aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2021-05-04 20:48:28 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2021-05-04 20:48:28 +0530
commitc1dd2c588e9bad58a760a06076c6689776d7d43d (patch)
treed12a5464dec63c3c4d8c8935c95593cefead5fa6 /src/tests
parentUse ZELLIJ_SOCKET_DIR env variable and make user specific tmp dir (diff)
downloadsl0ppij-c1dd2c588e9bad58a760a06076c6689776d7d43d.tar.gz
sl0ppij-c1dd2c588e9bad58a760a06076c6689776d7d43d.tar.xz
sl0ppij-c1dd2c588e9bad58a760a06076c6689776d7d43d.zip
Fix after rebase
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/fakes.rs39
1 files changed, 3 insertions, 36 deletions
diff --git a/src/tests/fakes.rs b/src/tests/fakes.rs
index 711d48ad..4c780410 100644
--- a/src/tests/fakes.rs
+++ b/src/tests/fakes.rs
@@ -14,8 +14,8 @@ use crate::os_input_output::{ClientOsApi, ServerOsApi};
use crate::server::ServerInstruction;
use crate::tests::possible_tty_inputs::{get_possible_tty_inputs, Bytes};
use crate::tests::utils::commands::{QUIT, SLEEP};
-use crate::utils::shared::colors;
-use zellij_tile::data::{Palette, PaletteSource, Theme};
+use crate::utils::shared::default_palette;
+use zellij_tile::data::Palette;
const MIN_TIME_BETWEEN_SNAPSHOTS: Duration = Duration::from_millis(150);
@@ -83,7 +83,6 @@ pub struct FakeInputOutput {
receive_instructions_from_client: Arc<Mutex<mpsc::Receiver<(ServerInstruction, ErrorContext)>>>,
should_trigger_sigwinch: Arc<(Mutex<bool>, Condvar)>,
sigwinch_event: Option<PositionAndSize>,
- palette: Arc<Mutex<Palette>>,
}
impl FakeInputOutput {
@@ -98,22 +97,6 @@ impl FakeInputOutput {
mpsc::channel();
let send_instructions_to_server = SenderWithContext::new(SenderType::Sender(server_sender));
win_sizes.insert(0, winsize); // 0 is the current terminal
-
- let palette: Palette = Palette {
- source: PaletteSource::Default,
- theme: Theme::Dark,
- fg: colors::BRIGHT_GRAY,
- bg: colors::GRAY,
- black: colors::BLACK,
- red: colors::RED,
- green: colors::GREEN,
- yellow: colors::GRAY,
- blue: colors::GRAY,
- magenta: colors::GRAY,
- cyan: colors::GRAY,
- white: colors::WHITE,
- orange: colors::ORANGE,
- };
FakeInputOutput {
read_buffers: Arc::new(Mutex::new(HashMap::new())),
stdin_writes: Arc::new(Mutex::new(HashMap::new())),
@@ -130,7 +113,6 @@ impl FakeInputOutput {
send_instructions_to_client,
should_trigger_sigwinch: Arc::new((Mutex::new(false), Condvar::new())),
sigwinch_event: None,
- palette: Arc::new(Mutex::new(palette)),
}
}
pub fn with_tty_inputs(mut self, tty_inputs: HashMap<u16, Bytes>) -> Self {
@@ -309,21 +291,6 @@ impl ServerOsApi for FakeInputOutput {
fn add_client_sender(&mut self) {}
fn update_receiver(&mut self, _stream: LocalSocketStream) {}
fn load_palette(&self) -> Palette {
- let palette: Palette = Palette {
- source: PaletteSource::Default,
- theme: Theme::Dark,
- fg: colors::BRIGHT_GRAY,
- bg: colors::GRAY,
- black: colors::BLACK,
- red: colors::RED,
- green: colors::GREEN,
- yellow: colors::GRAY,
- blue: colors::GRAY,
- magenta: colors::GRAY,
- cyan: colors::GRAY,
- white: colors::WHITE,
- orange: colors::ORANGE,
- };
- palette
+ default_palette()
}
}