summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorMichael Brown2016-03-13 15:51:15 +0100
committerMichael Brown2016-03-13 15:51:15 +0100
commit17c1488a441756974d77d52a2b84c9c439327b47 (patch)
treeffefcf7fe4b330e97b42aa766432ee12cc5fd916 /src/tests
parent[efi] Add processor binding headers for ARM and AArch64 (diff)
downloadipxe-17c1488a441756974d77d52a2b84c9c439327b47.tar.gz
ipxe-17c1488a441756974d77d52a2b84c9c439327b47.tar.xz
ipxe-17c1488a441756974d77d52a2b84c9c439327b47.zip
[uri] Support URIs containing only scheme and path components
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/uri_test.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/tests/uri_test.c b/src/tests/uri_test.c
index 57f211aa..add6e468 100644
--- a/src/tests/uri_test.c
+++ b/src/tests/uri_test.c
@@ -610,6 +610,34 @@ static struct uri_test uri_iscsi = {
},
};
+/** File URI with relative (opaque) path */
+static struct uri_test uri_file_relative = {
+ "file:script.ipxe",
+ {
+ .scheme = "file",
+ .opaque = "script.ipxe",
+ },
+};
+
+/** File URI with absolute path */
+static struct uri_test uri_file_absolute = {
+ "file:/boot/script.ipxe",
+ {
+ .scheme = "file",
+ .path = "/boot/script.ipxe",
+ },
+};
+
+/** File URI with volume name */
+static struct uri_test uri_file_volume = {
+ "file://hpilo/boot/script.ipxe",
+ {
+ .scheme = "file",
+ .host = "hpilo",
+ .path = "/boot/script.ipxe",
+ },
+};
+
/** URI with port number */
static struct uri_port_test uri_explicit_port = {
"http://192.168.0.1:8080/boot.php",
@@ -899,6 +927,9 @@ static void uri_test_exec ( void ) {
uri_parse_format_dup_ok ( &uri_ipv6_local );
uri_parse_ok ( &uri_ipv6_local_non_conforming ); /* Parse only */
uri_parse_format_dup_ok ( &uri_iscsi );
+ uri_parse_format_dup_ok ( &uri_file_relative );
+ uri_parse_format_dup_ok ( &uri_file_absolute );
+ uri_parse_format_dup_ok ( &uri_file_volume );
/** URI port number tests */
uri_port_ok ( &uri_explicit_port );