mirror of
https://github.com/nishiki/manage-password.git
synced 2025-03-20 21:34:35 +00:00
fix no show wallet in other folder
This commit is contained in:
parent
ef0a908144
commit
2abad3695f
2 changed files with 6 additions and 1 deletions
|
@ -373,7 +373,8 @@ module MPW
|
||||||
|
|
||||||
# List all wallets
|
# List all wallets
|
||||||
def list_wallet
|
def list_wallet
|
||||||
wallets = []
|
wallets = @config.wallet_paths.keys
|
||||||
|
|
||||||
Dir.glob("#{@config.wallet_dir}/*.mpw").each do |f|
|
Dir.glob("#{@config.wallet_dir}/*.mpw").each do |f|
|
||||||
wallet = File.basename(f, '.mpw')
|
wallet = File.basename(f, '.mpw')
|
||||||
wallet += ' *'.green if wallet == @config.default_wallet
|
wallet += ' *'.green if wallet == @config.default_wallet
|
||||||
|
|
|
@ -171,6 +171,10 @@ class TestConfig < Test::Unit::TestCase
|
||||||
assert_match(%r{path_wallet_default.+\| #{Dir.pwd}/default.mpw}, output)
|
assert_match(%r{path_wallet_default.+\| #{Dir.pwd}/default.mpw}, output)
|
||||||
assert(File.exist?("#{Dir.pwd}/default.mpw"))
|
assert(File.exist?("#{Dir.pwd}/default.mpw"))
|
||||||
|
|
||||||
|
output = %x(mpw wallet)
|
||||||
|
puts output
|
||||||
|
assert_match('default', output)
|
||||||
|
|
||||||
output = %x(mpw wallet --default-path)
|
output = %x(mpw wallet --default-path)
|
||||||
puts output
|
puts output
|
||||||
assert_match(I18n.t('form.set_wallet_path.valid'), output)
|
assert_match(I18n.t('form.set_wallet_path.valid'), output)
|
||||||
|
|
Loading…
Add table
Reference in a new issue