mirror of
https://github.com/NixOS/nix
synced 2025-06-28 13:41:15 +02:00
Add unit testes for url.cc
This adds tests for - parseURL - percentDecode - decodeQuery
This commit is contained in:
parent
5ef64f05e6
commit
a73a820a5d
2 changed files with 271 additions and 1 deletions
|
@ -5,6 +5,8 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
/* ----------- tests for util.hh ------------------------------------------------*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* absPath
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
@ -15,6 +17,9 @@ namespace nix {
|
|||
ASSERT_EQ(p, "/");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
TEST(absPath, turnsEmptyPathIntoCWD) {
|
||||
char cwd[PATH_MAX+1];
|
||||
auto p = absPath("");
|
||||
|
@ -581,5 +586,4 @@ namespace nix {
|
|||
|
||||
ASSERT_EQ(filterANSIEscapes(s, true), "foo bar baz" );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue