diff --git a/tests/by-util/test_tsort.rs b/tests/by-util/test_tsort.rs index 8b01e2a2d6..62a74c31d0 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!()