Improved unit tests coverage
This commit is contained in:
parent
b5ca6cc946
commit
d02d4b2378
11 changed files with 107 additions and 15 deletions
|
@ -89,13 +89,13 @@ expect {
|
|||
}
|
||||
}
|
||||
|
||||
test_label "Should format USB flash drive and backup secret showing passphrase"
|
||||
test_label "Should backup secret showing passphrase"
|
||||
|
||||
spawn qr-backup.sh
|
||||
|
||||
expect {
|
||||
-re {Format USB flash drive \(y or n\)\?} {
|
||||
test_send "y\r"
|
||||
test_send "n\r"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,10 +105,6 @@ expect {
|
|||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {mkfs\.fat 4\.1 \(2017-01-24\)}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {Please type secret and press enter, then ctrl\+d} {
|
||||
test_send "$secret\r"
|
||||
|
@ -191,7 +187,7 @@ expect {
|
|||
}
|
||||
}
|
||||
|
||||
regsub -all {(\e\(B)?\e\[[0-9]*?m} $restored_secret {} restored_secret
|
||||
regsub -all {\033\[[0-9]*m(\017)?} $restored_secret {} restored_secret
|
||||
regsub -all {\r} $restored_secret {} restored_secret
|
||||
|
||||
if { "$restored_secret" != "$secret" } {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue