Make setq bind locally

This commit is contained in:
2022-11-16 22:55:25 -05:00
parent a093fb0b9c
commit 2ae4e38400
2 changed files with 7 additions and 3 deletions

View File

@@ -152,6 +152,10 @@ void test_setq(void) {
}
void test_setq_from_function(void) {
response = eval("(setq bar 1)");
TEST_ASSERT_OBJ_INT_V(response, 1);
response = eval("(defun foo (a) (setq bar a))");
TEST_ASSERT_OBJ_SYMBOL_V(response, "foo");
@@ -162,7 +166,7 @@ void test_setq_from_function(void) {
response = eval("bar");
TEST_ASSERT_OBJ_INT_V(response, 2);
TEST_ASSERT_OBJ_INT_V(response, 1);
}
void test_lambda(void) {