mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-16 15:07:53 +00:00
chore: add test for vless query default values
This commit is contained in:
@@ -100,4 +100,17 @@ mod tests {
|
|||||||
assert_eq!(parsed_query.r#flow, "xtls-rprx-vision");
|
assert_eq!(parsed_query.r#flow, "xtls-rprx-vision");
|
||||||
assert_eq!(parsed_query.path, "/");
|
assert_eq!(parsed_query.path, "/");
|
||||||
}
|
}
|
||||||
|
#[test]
|
||||||
|
fn parse_vless_query_with_defaults() {
|
||||||
|
let query = "";
|
||||||
|
let parsed_query = get_vless_query_data(query);
|
||||||
|
assert_eq!(parsed_query.sni, "");
|
||||||
|
assert_eq!(parsed_query.security, "");
|
||||||
|
assert_eq!(parsed_query.fp, "");
|
||||||
|
assert_eq!(parsed_query.pbk, "");
|
||||||
|
assert_eq!(parsed_query.sid, "");
|
||||||
|
assert_eq!(parsed_query.r#type, "");
|
||||||
|
assert_eq!(parsed_query.r#flow, "");
|
||||||
|
assert_eq!(parsed_query.path, "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user