2021-04-17 16:31:44 -04:00
|
|
|
#!/usr/bin/expect
|
|
|
|
|
2021-04-18 10:06:04 -04:00
|
|
|
source ./test.exp
|
2021-04-17 16:31:44 -04:00
|
|
|
|
2021-04-18 10:06:04 -04:00
|
|
|
test_label "Should create Electrum mnemonic"
|
2021-04-17 16:31:44 -04:00
|
|
|
|
|
|
|
spawn qr-backup.sh --create-electrum-mnemonic
|
|
|
|
|
|
|
|
expect {
|
|
|
|
-re {Format USB flash drive \(y or n\)\?} {
|
2021-04-18 10:06:04 -04:00
|
|
|
test_send "n\r"
|
2021-04-17 16:31:44 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
expect {
|
|
|
|
-re {\[sudo\] password for pi:} {
|
2021-04-18 10:06:04 -04:00
|
|
|
test_send "$env(password)\r"
|
2021-04-17 16:31:44 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
expect {
|
|
|
|
-re {Creating Electrum mnemonic…}
|
|
|
|
}
|
|
|
|
|
|
|
|
expect {
|
2021-04-18 10:06:04 -04:00
|
|
|
-re {([a-z]+ ?){24}} {
|
|
|
|
test_ok true
|
2021-04-17 16:31:44 -04:00
|
|
|
}
|
2021-05-21 14:02:00 -04:00
|
|
|
eof {
|
|
|
|
test_failed
|
|
|
|
}
|
2021-04-17 16:31:44 -04:00
|
|
|
}
|