summaryrefslogtreecommitdiff
path: root/suite
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2020-09-28 17:38:49 +0800
committerXusheng <xusheng@vector35.com>2020-11-16 10:15:09 +0800
commitf1c595545685258840b961bfe6acecd2da56ed87 (patch)
treeee7d7df7298452b9413fd8d142cdcb078c49c0a7 /suite
parentcb2b7ad0f73751277d88a28e93c1ec99531836b2 (diff)
add a unit test for loading old database
Diffstat (limited to 'suite')
m---------suite/binaries0
-rw-r--r--suite/testcommon.py13
2 files changed, 13 insertions, 0 deletions
diff --git a/suite/binaries b/suite/binaries
-Subproject 5712e66fa4aad7fc0bba541b012abbb877ea576
+Subproject fd6fb188a1b8830a168ac8234495ae21f019eb8
diff --git a/suite/testcommon.py b/suite/testcommon.py
index 992a7961..c5bf4895 100644
--- a/suite/testcommon.py
+++ b/suite/testcommon.py
@@ -1541,3 +1541,16 @@ class VerifyBuilder(Builder):
self.delete_package("helloworld")
callback_should_run = False
+ def test_load_old_database(self):
+ """Load a database produced by Binary Ninja v1.2.1921"""
+ file_name = os.path.join(os.path.dirname(__file__), self.test_store, "..", "binja_v1.2.1921_bin_ls.bndb")
+ if not os.path.exists(file_name):
+ return False
+
+ with BinaryViewType.get_view_of_file(file_name) as bv:
+ if bv is None:
+ return False
+ if bv.file.snapshot_data_applied_without_error:
+ return True
+
+ return False