projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b96f93
)
all write records tested!
author
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 4 Aug 2025 20:16:17 +0000
(13:16 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 4 Aug 2025 20:16:17 +0000
(13:16 -0700)
rust/pspp/src/sys/write.rs
patch
|
blob
|
history
diff --git
a/rust/pspp/src/sys/write.rs
b/rust/pspp/src/sys/write.rs
index 02e3ff5e2ef2e4f1e64e4eb63a41591a0e7255d5..7cd05e8699aa8f69149f36ccee134cd5b51c8408 100644
(file)
--- a/
rust/pspp/src/sys/write.rs
+++ b/
rust/pspp/src/sys/write.rs
@@
-1930,4
+1930,18
@@
$e=E 11 6 choice 0 n o p
)"
);
}
+
+ #[test]
+ fn encoding() {
+ let dictionary = Dictionary::new(UTF_8);
+ let mut raw = Vec::new();
+ DictionaryWriter::new(
+ &WriteOptions::reproducible(None),
+ &mut Cursor::new(&mut raw),
+ &dictionary,
+ )
+ .write_encoding()
+ .unwrap();
+ assert_eq!(str::from_utf8(&raw[16..]).unwrap(), "UTF-8");
+ }
}