From d2f9e204aacc13c6205a3d0f1022d4fd17073a7b Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Fri, 11 Jan 2019 13:30:39 +0000 Subject: Add the get_library_version function This patch adds the get_library_version function to the main library module that queries and returns the libnitrokey version. As the version fields are static values, we fetch them all at the same time and do not provide getters for the individual fields. --- tests/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/lib.rs (limited to 'tests/lib.rs') diff --git a/tests/lib.rs b/tests/lib.rs new file mode 100644 index 0000000..06de0ad --- /dev/null +++ b/tests/lib.rs @@ -0,0 +1,8 @@ +#[test] +fn get_library_version() { + let version = nitrokey::get_library_version(); + + assert!(!version.git.is_empty()); + assert!(version.git.starts_with("v")); + assert!(version.major > 0); +} -- cgit v1.2.1