@@ -637,6 +637,24 @@ def test_wallet_with_path_ending_in_slash(self):
637
637
638
638
assert_equal (bals , wallet .getbalances ())
639
639
640
+ def test_wallet_with_path_ending_in_relative_specifier (self ):
641
+ self .log .info ("Test migrating a wallet with a name/path ending in a relative specifier, '..'" )
642
+ wallet_ending_in_relative = "path/that/ends/in/.."
643
+ # the wallet data is actually inside of path/that/ends/
644
+ wallet = self .create_legacy_wallet (wallet_ending_in_relative )
645
+ default = self .master_node .get_wallet_rpc (self .default_wallet_name )
646
+
647
+ addr = wallet .getnewaddress ()
648
+ txid = default .sendtoaddress (addr , 1 )
649
+ self .generate (self .master_node , 1 )
650
+ bals = wallet .getbalances ()
651
+
652
+ _ , wallet = self .migrate_and_get_rpc (wallet_ending_in_relative )
653
+
654
+ assert wallet .gettransaction (txid )
655
+
656
+ assert_equal (bals , wallet .getbalances ())
657
+
640
658
def test_default_wallet (self ):
641
659
self .log .info ("Test migration of the wallet named as the empty string" )
642
660
wallet = self .create_legacy_wallet ("" )
@@ -1529,6 +1547,7 @@ def run_test(self):
1529
1547
self .test_unloaded_by_path ()
1530
1548
self .test_wallet_with_relative_path ()
1531
1549
self .test_wallet_with_path_ending_in_slash ()
1550
+ self .test_wallet_with_path_ending_in_relative_specifier ()
1532
1551
self .test_default_wallet ()
1533
1552
self .test_direct_file ()
1534
1553
self .test_addressbook ()
0 commit comments