aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-23 04:27:14 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-01-23 05:30:23 +0100
commitd4663961c41a0fb6f81f4a54aefd0fedce49d350 (patch)
tree2622fdecee2dd3c2926118cad296e2c0772fedd1 /tests
parentc79ddf8116659efd1aa7de42bb85337632f238dd (diff)
downloadnitrokey-rs-d4663961c41a0fb6f81f4a54aefd0fedce49d350.tar.gz
nitrokey-rs-d4663961c41a0fb6f81f4a54aefd0fedce49d350.tar.bz2
Return UTF-8 error if libnitrokey returns an invalid string
Previously, we used lossy UTF-8 conversion. Yet the user should be notified if we have a problem instead of silently changing the data. Therefore, we now return an error if we enocunter an invalid UTF-8 string. This leads to a change in `get_library_version`’s signature.
Diffstat (limited to 'tests')
-rw-r--r--tests/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/lib.rs b/tests/lib.rs
index c92e224..d298048 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -1,6 +1,6 @@
#[test]
fn get_library_version() {
- let version = nitrokey::get_library_version();
+ let version = nitrokey::get_library_version().unwrap();
assert!(version.git.is_empty() || version.git.starts_with("v"));
assert!(version.major > 0);