From ea81a8087bcd7953b083a2be9db447f75e7ebf56 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Wed, 2 Apr 2014 22:23:37 -0500 Subject: All: split types into types, env, printer, core. - types: low-level mapping to the implementation language. - core: functions on types that are exposed directly to mal. - printer: implementation called by pr-str, str, prn, println. - env: the environment implementation - Also, unindent all TCO while loops so that the diff of step4 and step5 are minimized. --- bash/tests/types.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bash/tests') diff --git a/bash/tests/types.sh b/bash/tests/types.sh index 7ce1ce4..0e073c5 100644 --- a/bash/tests/types.sh +++ b/bash/tests/types.sh @@ -39,8 +39,8 @@ assert_eq $LINENO ${__true} "string? ${STR2}" echo "Testing function objects" -assert_eq $LINENO "function" "new_function \"echo hello\"; _obj_type \$r" -new_function "r=\"arg1:'\$1' arg2:'\$2'\""; FN1="${r}" +assert_eq $LINENO "function" "_function \"echo hello\"; _obj_type \$r" +_function "r=\"arg1:'\$1' arg2:'\$2'\""; FN1="${r}" assert_eq $LINENO ${__true} "function? ${FN1}" assert_eq $LINENO "arg1:'A' arg2:'B'" "${ANON["${FN1}"]} A B" @@ -105,7 +105,7 @@ echo "Testing _map/map function" list; conj "${r}" 1 2 3; L5="${r}" inc () { r=$(( ${1} + 1)); } assert_eq $LINENO "2 3 4" "_map inc ${L5}; r=\${ANON[\$r]}" -new_function "r=\$(( \$1 + 1 ));"; inc_func="${r}" +_function "r=\$(( \$1 + 1 ));"; inc_func="${r}" assert_eq $LINENO "2 3 4" "map ${inc_func} ${L5}; r=\${ANON[\$r]}" -- cgit v1.2.3