Refactored guide, implemented ckcc and passphraseme and deprecated Electrum
This commit is contained in:
parent
908b211c36
commit
1965eca7f6
19 changed files with 351 additions and 548 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
source ./test.exp
|
||||
|
||||
set bip39_mnemonic "online pipe enough dutch decorate want moment scheme rigid enlist blast boat purse sick chalk shop brush all return betray jacket salon abandon retire"
|
||||
set electrum_mnemonic "month pet slice know amused leave now vague palm guess cattle element cross truly auto put among craft repeat van sample nephew sad family"
|
||||
set valid_bip39_mnemonic "online pipe enough dutch decorate want moment scheme rigid enlist blast boat purse sick chalk shop brush all return betray jacket salon abandon retire"
|
||||
set invalid_bip39_mnemonic "online pipe enough dutch decorate want moment scheme rigid enlist blast boat purse sick chalk shop brush all return betray jacket salon abandon check"
|
||||
|
||||
test_label "Should format flash drive and create BIP39 mnemonic"
|
||||
|
||||
|
@ -22,7 +22,7 @@ expect {
|
|||
}
|
||||
|
||||
expect {
|
||||
-re {mkfs\.fat 4\.1 \(2017-01-24\)}
|
||||
-re {mkfs\.fat 4\.2 \(2021-01-31\)}
|
||||
}
|
||||
|
||||
expect {
|
||||
|
@ -56,14 +56,14 @@ expect {
|
|||
|
||||
expect {
|
||||
-re {Please type secret and press enter, then ctrl\+d} {
|
||||
test_send "$bip39_mnemonic\r"
|
||||
test_send "$valid_bip39_mnemonic\r"
|
||||
test_send "\x04"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {Please type secret and press enter, then ctrl\+d \(again\)} {
|
||||
test_send "$bip39_mnemonic\r"
|
||||
test_send "$valid_bip39_mnemonic\r"
|
||||
test_send "\x04"
|
||||
}
|
||||
}
|
||||
|
@ -95,14 +95,14 @@ expect {
|
|||
|
||||
expect {
|
||||
-re {Please type secret and press enter, then ctrl\+d} {
|
||||
test_send "$electrum_mnemonic\r"
|
||||
test_send "$invalid_bip39_mnemonic\r"
|
||||
test_send "\x04"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {Please type secret and press enter, then ctrl\+d \(again\)} {
|
||||
test_send "$electrum_mnemonic\r"
|
||||
test_send "$invalid_bip39_mnemonic\r"
|
||||
test_send "\x04"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/expect
|
||||
|
||||
source ./test.exp
|
||||
|
||||
test_label "Should create Electrum mnemonic"
|
||||
|
||||
spawn qr-backup.sh --create-electrum-mnemonic
|
||||
|
||||
expect {
|
||||
-re {Format USB flash drive \(y or n\)\?} {
|
||||
test_send "n\r"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {\[sudo\] password for pi:} {
|
||||
test_send "$env(password)\r"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {Creating Electrum mnemonic…}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {([a-z]+ ?){24}} {
|
||||
test_ok true
|
||||
}
|
||||
eof {
|
||||
test_failed
|
||||
}
|
||||
}
|
61
how-to-create-encrypted-paper-backup/tests/passphrase.exp
Normal file
61
how-to-create-encrypted-paper-backup/tests/passphrase.exp
Normal file
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/expect
|
||||
|
||||
source ./test.exp
|
||||
|
||||
test_label "Should create 7-word passphrase"
|
||||
|
||||
spawn qr-backup.sh --create-passphrase
|
||||
|
||||
expect {
|
||||
-re {Format USB flash drive \(y or n\)\?} {
|
||||
test_send "n\r"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {\[sudo\] password for pi:} {
|
||||
test_send "$env(password)\r"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {Creating passphrase…}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {([a-z]+ ?){7}} {
|
||||
test_ok true
|
||||
}
|
||||
eof {
|
||||
test_failed
|
||||
}
|
||||
}
|
||||
|
||||
test_label "Should format flash drive and create 5-word passphrase using short #1 wordlist"
|
||||
|
||||
spawn qr-backup.sh --create-passphrase --wordlist short1 --word-count 5
|
||||
|
||||
expect {
|
||||
-re {Format USB flash drive \(y or n\)\?} {
|
||||
test_send "n\r"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {\[sudo\] password for pi:} {
|
||||
test_send "$env(password)\r"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {Creating passphrase…}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {([a-z]{3,5} ?){5}} {
|
||||
test_ok true
|
||||
}
|
||||
eof {
|
||||
test_failed
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue