mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
Add boost::regex regression test
This commit is contained in:
parent
908a011a4a
commit
333ea684b0
1 changed files with 8 additions and 0 deletions
|
@ -814,6 +814,14 @@ namespace nix {
|
|||
ASSERT_THAT(*v.listElems()[0], IsStringEq("FOO"));
|
||||
}
|
||||
|
||||
TEST_F(PrimOpTest, match5) {
|
||||
// The regex "\\{}" is valid and matches the string "{}".
|
||||
// Caused a regression before when trying to switch from std::regex to boost::regex.
|
||||
// See https://github.com/NixOS/nix/pull/7762#issuecomment-1834303659
|
||||
auto v = eval("builtins.match \"\\\\{}\" \"{}\"");
|
||||
ASSERT_THAT(v, IsListOfSize(0));
|
||||
}
|
||||
|
||||
TEST_F(PrimOpTest, attrNames) {
|
||||
auto v = eval("builtins.attrNames { x = 1; y = 2; z = 3; a = 2; }");
|
||||
ASSERT_THAT(v, IsListOfSize(4));
|
||||
|
|
Loading…
Reference in a new issue