Skip to content

Commit

Permalink
fixed never ending test
Browse files Browse the repository at this point in the history
  • Loading branch information
Arteiii committed Apr 24, 2024
1 parent f6633fa commit 7baec63
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/menu/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,19 @@ impl Input {
/// # Example
///
/// ```
/// use zenity::menu::input::{Input, Requirements};
///
/// // init and start directly
/// let input = Input::new("Name", Requirements::default()).start();
/// # use std::thread;
/// # use std::time::Duration;
/// use zenity::menu::input::{Input, Requirements};
///
/// # // spawn a new thread to run the input
/// # let input_thread = thread::spawn(|| {
/// // initialize the input
/// let input = Input::new("Name", Requirements::default()).start();
/// # });
/// # // wait for 5 seconds before joining the thread
/// # thread::sleep(Duration::from_secs(5));
/// # // assert true after waiting for 5 seconds
/// # assert!(true);
/// ```
pub fn start(&self) -> Box<String> {
let mut force: bool = false;
Expand Down

0 comments on commit 7baec63

Please sign in to comment.