diff options
author | Florian Klink <flokli@flokli.de> | 2024-04-19T11·30+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-04-19T19·22+0000 |
commit | caedd6ff86bd186df76ef135d7fc959f2b1a61f4 (patch) | |
tree | 5301e245f18d433b97dc387e89448e5667487479 /tvix/nix-compat/src/aterm/escape.rs | |
parent | 2783143414ac9597f3835bb899c5acb8d6992812 (diff) |
chore(nix-compat/aterm): migrate from test_case to rstest r/7971
Change-Id: If05fa3d0f41d45e3574e0c5ddff406cb33dc52f4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11470 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/nix-compat/src/aterm/escape.rs')
-rw-r--r-- | tvix/nix-compat/src/aterm/escape.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tvix/nix-compat/src/aterm/escape.rs b/tvix/nix-compat/src/aterm/escape.rs index 06b550bbf02d..80a85d210339 100644 --- a/tvix/nix-compat/src/aterm/escape.rs +++ b/tvix/nix-compat/src/aterm/escape.rs @@ -16,12 +16,13 @@ pub fn escape_bytes<P: AsRef<[u8]>>(s: P) -> Vec<u8> { #[cfg(test)] mod tests { use super::escape_bytes; - use test_case::test_case; + use rstest::rstest; - #[test_case(b"", b""; "empty")] - #[test_case(b"\"", b"\\\""; "doublequote")] - #[test_case(b":", b":"; "colon")] - fn escape(input: &[u8], expected: &[u8]) { + #[rstest] + #[case::empty(b"", b"")] + #[case::doublequote(b"\"", b"\\\"")] + #[case::colon(b":", b":")] + fn escape(#[case] input: &[u8], #[case] expected: &[u8]) { assert_eq!(expected, escape_bytes(input)) } } |