mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
451f8a8c19
We'll revert this sometime later
22 lines
655 B
C++
22 lines
655 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include "flake/flakeref.hh"
|
|
|
|
namespace nix {
|
|
|
|
/* ----------- tests for flake/flakeref.hh --------------------------------------------------*/
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
* to_string
|
|
* --------------------------------------------------------------------------*/
|
|
|
|
TEST(to_string, 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);
|
|
}
|
|
|
|
}
|