mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 00:56:15 +02:00
3fc77f281e
Progress on #5638
There are still a global fetcher and eval settings, but they are pushed
down into `libnixcmd`, which is a lot less bad a place for this sort of
thing.
Continuing process pioneered in
52bfccf8d8
.
24 lines
741 B
C++
24 lines
741 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include "fetch-settings.hh"
|
|
#include "flake/flakeref.hh"
|
|
|
|
namespace nix {
|
|
|
|
/* ----------- tests for flake/flakeref.hh --------------------------------------------------*/
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
* to_string
|
|
* --------------------------------------------------------------------------*/
|
|
|
|
TEST(to_string, doesntReencodeUrl) {
|
|
fetchers::Settings fetchSettings;
|
|
auto s = "http://localhost:8181/test/+3d.tar.gz";
|
|
auto flakeref = parseFlakeRef(fetchSettings, s);
|
|
auto parsed = flakeref.to_string();
|
|
auto expected = "http://localhost:8181/test/%2B3d.tar.gz";
|
|
|
|
ASSERT_EQ(parsed, expected);
|
|
}
|
|
|
|
}
|