Skip to content

Commit

Permalink
chore: Migrate from to
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonbrad committed Sep 6, 2024
1 parent 164df9b commit 3b6999f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 22 deletions.
16 changes: 6 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ anyhow = "1.0.81"
serde = { version = "1.0.197", optional = true }

[dev-dependencies]
rstk = "0.3.0"
afrish = { version = "0.1.0", default-features = false, git = "https://github.com/fodydev/afrish", rev = "e8c4fa2" }
17 changes: 6 additions & 11 deletions service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub fn run(
mod tests {
use crate::{frontend::Console, run, Config};
use rdev::{self, Button, EventType::*, Key::*};
use rstk::{self, TkPackLayout};
use afrish::{self, TkPackLayout};
use std::{thread, time::Duration};

macro_rules! input {
Expand Down Expand Up @@ -238,28 +238,23 @@ mod tests {
};
}

fn start_sandbox(start_point: &str) -> rstk::TkText {
let root = rstk::trace_with("wish").unwrap();
fn start_sandbox(start_point: &str) -> afrish::TkText {
let root = afrish::trace_with("wish").unwrap();
root.title("Afrim Test Environment");

let input_field = rstk::make_text(&root);
let input_field = afrish::make_text(&root);
input_field.width(50);
input_field.height(12);
input_field.pack().layout();
root.geometry(200, 200, 0, 0);
input_field.insert((1, 1), start_point);
rstk::tell_wish(
r#"
chan configure stdout -encoding utf-8;
wm protocol . WM_DELETE_WINDOW {destroy .};
"#,
);
afrish::tell_wish("wm protocol . WM_DELETE_WINDOW {destroy .};");
thread::sleep(Duration::from_secs(1));
input_field
}

fn end_sandbox() {
rstk::end_wish();
afrish::end_wish();
}

fn start_simulation() {
Expand Down

0 comments on commit 3b6999f

Please sign in to comment.