Files
lix/tests/unit/libflakes/flakeref.cc
T
Raito Bezarius de0447c2c6 -------------- ongoing crimes
Change-Id: Iedd51025b3a5a25b6570983726f8a237c53f5192
2025-11-21 17:40:21 +01:00

27 lines
747 B
C++

#include <gtest/gtest.h>
#include "lix/libflakes/expr/flakeref.hh"
#include "tests/libexpr.hh"
namespace nix {
class FlakeRefTest : public LibExprTest {};
/* ----------- tests for flake/flakeref.hh --------------------------------------------------*/
/* ----------------------------------------------------------------------------
* to_string
* --------------------------------------------------------------------------*/
TEST_F(FlakeRefTest, doesntReencodeUrl) {
auto s = "http://localhost:8181/test/+3d.tar.gz";
auto flakeref = parseFlakeRef(s);
auto parsed = flakeref.to_string();
auto expected = "http://localhost:8181/test/%2B3d.tar.gz";
ASSERT_EQ(parsed, expected);
}
}