Skip to content

Commit

Permalink
tsort: Add test for ordered floating nodes
Browse files Browse the repository at this point in the history
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
  • Loading branch information
cazou committed Jun 5, 2023
1 parent b070506 commit 43a8d62
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/by-util/test_tsort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!()
Expand Down

0 comments on commit 43a8d62

Please sign in to comment.