Skip to content

Commit

Permalink
GitHubClient: discover how the name filter works
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbobbio committed Dec 4, 2024
1 parent 0986252 commit 15bf68b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/maelstrom-github/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,5 +403,15 @@ mod tests {
.unwrap();

assert_eq!(downloaded, TEST_DATA);

// discover how filtering works
client.upload("test_foo", TEST_DATA).await.unwrap();
for f in ["test_", "foo", "data", "^foo", "^test_"] {
let listing = client.list(Some(f.into()), None).await.unwrap();
println!(
"list with filter {f:?}: {:?}",
Vec::from_iter(listing.into_iter().map(|a| a.name))
);
}
}
}

0 comments on commit 15bf68b

Please sign in to comment.