Explicit test for bug that caused all this trouble

This commit is contained in:
Robert Bendun 2022-05-22 00:05:05 +02:00
parent c55650e12b
commit da6d57a280

View File

@ -74,5 +74,11 @@ suite intepreter_test = [] {
expect(eq(result.error().type, errors::Not_Callable)); expect(eq(result.error().type, errors::Not_Callable));
} }
}; };
// Added to explicitly test against bug that was in old implementation of enviroments.
// Previously this test would segfault
should("allow assigning result of function calls to a variable") = [] {
evaluates_to(Value::number(Number(42)), "var x = [i|i] 42; x");
};
}; };
}; };