From 43a8d62b903d254af282cc70a4f52be55e302f63 Mon Sep 17 00:00:00 2001 From: Detlev Casanova Date: Mon, 5 Jun 2023 11:00:47 -0400 Subject: [PATCH] tsort: Add test for ordered floating nodes Signed-off-by: Detlev Casanova --- tests/by-util/test_tsort.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/by-util/test_tsort.rs b/tests/by-util/test_tsort.rs index 8b01e2a2d..62a74c31d 100644 --- a/tests/by-util/test_tsort.rs +++ b/tests/by-util/test_tsort.rs @@ -20,6 +20,14 @@ fn test_sort_self_loop() { .stdout_only("first\nsecond\n"); } +#[test] +fn test_sort_floating_nodes() { + new_ucmd!() + .pipe_in("d d\nc c\na a\nb b") + .succeeds() + .stdout_only("a\nb\nc\nd\n"); +} + #[test] fn test_no_such_file() { new_ucmd!()