1
0
Fork 0
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:
Tobias Pflug 2020-05-20 16:27:53 +02:00
parent 5ef64f05e6
commit a73a820a5d
2 changed files with 271 additions and 1 deletions

View file

@ -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" );
}
}