...
This commit is contained in:
@@ -10,9 +10,9 @@ fn testsuite_begin() {
|
||||
muttmux := new() or { panic('Cannot create tmux: ${err}') }
|
||||
|
||||
// reset tmux for tests
|
||||
is_running := tmux.is_running() or { panic('cannot check if tmux is running: ${err}') }
|
||||
is_running := is_running() or { panic('cannot check if tmux is running: ${err}') }
|
||||
if is_running {
|
||||
tmux.stop() or { panic('Cannot stop tmux: ${err}') }
|
||||
stop() or { panic('Cannot stop tmux: ${err}') }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,27 +41,21 @@ fn test_window_new() ! {
|
||||
|
||||
// tests creating duplicate windows
|
||||
fn test_window_new0() {
|
||||
installer := get_install()!
|
||||
|
||||
|
||||
installer := tmux.get_install(
|
||||
|
||||
mut tmux := Tmux {
|
||||
mut tmux := Tmux{
|
||||
node: node_ssh
|
||||
}
|
||||
|
||||
window_args := WindowArgs {
|
||||
window_args := WindowArgs{
|
||||
name: 'TestWindow0'
|
||||
}
|
||||
|
||||
// console.print_debug(tmux)
|
||||
mut window := tmux.window_new(window_args) or {
|
||||
panic("Can't create new window: $err")
|
||||
}
|
||||
mut window := tmux.window_new(window_args) or { panic("Can't create new window: ${err}") }
|
||||
assert tmux.sessions.keys().contains('main')
|
||||
mut window_dup := tmux.window_new(window_args) or {
|
||||
panic("Can't create new window: $err")
|
||||
}
|
||||
console.print_debug(node_ssh.exec('tmux ls') or { panic("fail:$err")})
|
||||
window.delete() or { panic("Cant delete window") }
|
||||
mut window_dup := tmux.window_new(window_args) or { panic("Can't create new window: ${err}") }
|
||||
console.print_debug(node_ssh.exec('tmux ls') or { panic('fail:${err}') })
|
||||
window.delete() or { panic('Cant delete window') }
|
||||
// console.print_debug(tmux)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user