Skip to content

Commit 439f6dc

Browse files
committed
test: add test cases for prefix
1 parent 65ba95e commit 439f6dc

File tree

1 file changed

+8
-2
lines changed
  • datafusion/core/src/datasource/listing

1 file changed

+8
-2
lines changed

datafusion/core/src/datasource/listing/url.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,14 @@ mod tests {
249249
let child = Path::parse("/foob/bar").unwrap();
250250
assert!(url.strip_prefix(&child).is_none());
251251

252-
let url = ListingTableUrl::parse("file:///with space/foo/bar").unwrap();
253-
assert_eq!(url.prefix.as_ref(), "with space/foo/bar");
252+
let url = ListingTableUrl::parse("file:///foo/ bar").unwrap();
253+
assert_eq!(url.prefix.as_ref(), "foo/ bar");
254+
255+
let url = ListingTableUrl::parse("file:///foo/bar?").unwrap();
256+
assert_eq!(url.prefix.as_ref(), "foo/bar");
257+
258+
let url = ListingTableUrl::parse("file:///foo/😺").unwrap();
259+
assert_eq!(url.prefix.as_ref(), "foo/%F0%9F%98%BA");
254260
}
255261

256262
#[test]

0 commit comments

Comments
 (0)