about summary refs log tree commit diff
path: root/tvix/nix-compat/src/nar/listing/test.rs
blob: 088a6133f531c80f60e4bc2cfaaaeeebe5faa047 (plain) (blame)
1
2
3
4
5
6
7
8
9
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 { .. }));
}