VirtualBox

Changeset 74998 in vbox for trunk/src/VBox/Runtime/testcase


Ignore:
Timestamp:
Oct 23, 2018 1:17:52 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126024
Message:

tstRTCRest-1: path escaping was changed without updating the testcase... fixed. bugref:9167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTCRest-1.cpp

    r74997 r74998  
    20282028        RTTESTI_CHECK_RC(doPathParameters(&strPath, RT_STR_TUPLE("my/{integer}/{string}/array:{array}/path"),
    20292029                                          s_aParams, aState, RT_ELEMENTS(aState)), VINF_SUCCESS);
    2030         RTTESTI_CHECK_MSG(strPath.equals(a_pszExpected), ("actual: '%s'\nexpect: %s\n", strPath.c_str(), a_pszExpected));
     2030        RTTESTI_CHECK_MSG(strPath.equals(a_pszExpected), ("actual: '%s'\nexpect: '%s'\n", strPath.c_str(), a_pszExpected));
    20312031    }
    20322032
     
    21102110    {
    21112111        TestRequest Req1("this-is-a-string", 123456789, 5, "1", "22", "333", "444", "555");
    2112         Req1.testPath("my/123456789/this-is-a-string/array:1,22,333,444,555/path");
     2112        Req1.testPath("my/123456789/this-is-a-string/array:1%2C22%2C333%2C444%2C555/path");
    21132113        Req1.testQuery("?string=this-is-a-string&integer=123456789&array=1%2C22%2C333%2C444%2C555",
    21142114                       "?string=this-is-a-string&integer=123456789&array=1%2022%20333%20444%20555",
     
    21232123        RTTESTI_CHECK_RC(Req2.m_Map.put("stuff-2", new RTCRestString("stuffy-value-2")), VINF_SUCCESS);
    21242124        RTTESTI_CHECK_RC(Req2.m_Map.put("2222", new RTCRestString("33")), VINF_SUCCESS);
    2125         Req2.testPath("my/42/;'[]/array:null,foo,bar/path"); /// @todo shouldn't the string chars (;'[]) be escaped?
     2125        Req2.testPath("my/42/%3B%27%5B%5D/array:null%2Cfoo%2Cbar/path");
    21262126        Req2.testQuery("?string=%3B%27%5B%5D&integer=42&array=null%2Cfoo%2Cbar",
    21272127                       "?string=%3B%27%5B%5D&integer=42&array=null%20foo%20bar",
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette