about summary refs log tree commit diff
path: root/tvix/nix-compat/src/nar/listing/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/nix-compat/src/nar/listing/test.rs')
-rw-r--r--tvix/nix-compat/src/nar/listing/test.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tvix/nix-compat/src/nar/listing/test.rs b/tvix/nix-compat/src/nar/listing/test.rs
new file mode 100644
index 000000000000..088a6133f531
--- /dev/null
+++ b/tvix/nix-compat/src/nar/listing/test.rs
@@ -0,0 +1,10 @@
+use crate::nar;
+
+#[test]
+fn nixos_release() {
+    let listing_bytes = include_bytes!("../tests/nixos-release.ls");
+    let listing: nar::listing::Listing = serde_json::from_slice(listing_bytes).unwrap();
+
+    let nar::listing::Listing::V1 { root, .. } = listing;
+    assert!(matches!(root, nar::listing::ListingEntry::Directory { .. }));
+}