diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-02 22:23:37 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-02 22:23:37 -0500 |
| commit | ea81a8087bcd7953b083a2be9db447f75e7ebf56 (patch) | |
| tree | 6cf47a2dbd55d42efc4a901eaabdec952f40ce89 /bash/tests | |
| parent | 1617910ad342a55762f3ddabb975849d843cff85 (diff) | |
| download | mal-ea81a8087bcd7953b083a2be9db447f75e7ebf56.tar.gz mal-ea81a8087bcd7953b083a2be9db447f75e7ebf56.zip | |
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.
Diffstat (limited to 'bash/tests')
| -rw-r--r-- | bash/tests/types.sh | 6 |
1 files changed, 3 insertions, 3 deletions
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]}" |
