* libguile/ports.c (get_codepoint): Reset `pt->input_cd' upon failure.
If `pt->ilseq_handler' is `SCM_ICONVEH_QUESTION_MARK', then return a
question mark.
[failure]: Use `scm_encoding_error' when raising an error.
* test-suite/lib.scm (exception:encoding-error): Adjust regexp.
* test-suite/tests/ports.test ("string ports")["read-char, wrong
encoding, error", "read-char, wrong encoding, escape", "read-char,
wrong encoding, substitute"]: New tests.
* libguile/vm-engine.c (VM_NAME)[vm_error_stack_overflow]: Increase
`vp->stack_limit' when possible.
* libguile/vm.c (VM_STACK_RESERVE_SIZE): New macro.
* test-suite/lib.scm (exception:vm-error): New variable.
* test-suite/tests/eval.test ("stack overflow"): New test prefix.
* libguile/foreign.c (sym_null_pointer_error): New variable.
(null_pointer_error): New function.
(scm_foreign_set_x): Raise an error if attempting to modify
NULL_POINTER.
(scm_foreign_to_bytevector): Use `null_pointer_error ()' instead of
`scm_misc_error ()'.
* test-suite/tests/foreign.test: New file.
* test-suite/Makefile.am (SCM_TESTS): Add tests/foreign.test.
* test-suite/lib.scm (exception:null-pointer-error): New variable.
* test-suite/lib.scm (with-locale*): Set LOC to the previous locale
name, not to the new locale name. Only restore LOC when it's not #f.
(with-locale): Use `syntax-rules'.
* libguile/strports.c (scm_i_mkstrport): Remove.
(scm_mkstrport): Don't change the port's encoding to UTF-8; convert
STR to the default port encoding.
(scm_strport_to_string): Fix documentation & indentation.
* libguile/strports.h (scm_i_mkstrport): Remove.
* test-suite/lib.scm (exception:encoding-error): New variable.
(format-test-name): Set `%default-port-encoding' to "UTF-8".
* test-suite/tests/ports.test ("string ports")["%default-port-encoding
is honored", "suitable encoding [latin-1]", "suitable encoding
[latin-3]", "wrong encoding"]: New tests.
* test-suite/tests/r6rs-ports.test ("7.2.11 Binary
Output")["put-bytevector with UTF-16 string port", "put-bytevector
with wrong-encoding string port"]: New tests.
* test-suite/tests/reader.test (read-string): Set
`%default-port-encoding' to `#f'.
("reading")["unprintable symbol"]: Use a string that doesn't contain
zeros.
* doc/ref/api-io.texi (String Ports): Document encoding issues with
`call-with-output-string' and `with-output-to-string'.
* test-suite/lib.scm (with-locale, with-locale*): new test functions
* test-suite/tests/encoding-escapes: don't fail if en_US.utf8 doesn't exist
* test-suite/tests/encoding-iso88591.test: set and restore locale, if
possible
* test-suite/tests/encoding-iso88597.test: set and restore locale, if
possible
* test-suite/tests/encoding-utf8.test: set and restore locale, if possible
* test-suite/tests/srfi-14.test: don't need to setlocale to Latin-1 to
test Latin-1 since string conversion is handled at read/compile time.
Set and restore locale, if possible.
* libguile/read.c (scm_read_bytevector): New function.
(scm_read_sharp): Add `v' case for bytevectors.
* test-suite/lib.scm (exception:read-error): New variable.
* test-suite/tests/bytevectors.test ("Datum Syntax"): New test set.
* module/language/tree-il.scm (parse-tree-il): Fix a number of bugs.
(unparse-tree-il): Apply takes rest args now.
* module/language/tree-il/analyze.scm (analyze-lexicals)
(analyze-lexicals): Heap vars shouldn't increment the number of locals.
* module/language/tree-il/optimize.scm (resolve-primitives!): Don't
resolve public refs to primitives, not at the moment anyway.
* test-suite/Makefile.am (SCM_TESTS): Add tree-il test.
* test-suite/lib.scm (pass-if, expect-fail, pass-if-exception)
(expect-fail-exception): Rewrite as syntax-rules macros. In a very
amusing turn of events, it turns out that bindings introduced by
hygienic macros are not visible inside expansions produced by
defmacros. This seems to be expected, so go ahead and work around the
problem.
* test-suite/tests/srfi-31.test ("rec special form"): Expand in eval.
* test-suite/tests/syntax.test ("begin"): Do some more expanding in eval,
though all is not yet well.
* test-suite/tests/tree-il.test: New test suite, for tree-il->glil
compilation.
with-debugging-evaluator.
* lib.scm (with-debugging-evaluator*, with-debugging-evaluator):
New utilities.
* standalone/test-use-srfi: Use -q to avoid picking up the user's
~/.guile file.
* tests/eval.test (promises)[unmemoizing a promise]: New test.
scm_m_expand_body, check_bindings): Extracted syntax checking of
bindings to new static function check_bindings.
(scm_m_let, memoize_named_let): Extracted handling of named let to
new static function memoize_named_let.
(transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
ASSERT_SYNTAX to signal syntax errors. Be more specific about the
kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
unnecessary consing when creating the memoized code.
* test-suite/lib.scm (exception:bad-variable): New.
* test-suite/tests/syntax.test (exception:bad-binding,
exception:duplicate-binding): New.
(exception:duplicate-bindings): Removed.
Adapted tests for 'let', 'let*' and 'letrec' to the new way of
error reporting.
ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
(scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
unnecessary consing when creating the memoized code.
* test-suite/lib.scm (run-test-exception): Handle syntax errors.
* tests/dynamic-scope.test, tests/eval.test,
tests/r5rs_pitfall.test, tests/srfi-17.test, tests/syncase.test:
Wrap tests in module (test-suite test-<file-name without .test>),
following a practice that was used on a couple of files already.
* tests/dynamic-scope.test (exception:duplicate-binding,
exception:bad-binding): New.
* tests/dynamic-scope.test, tests/srfi-17.test, tests/syntax.test:
Execute syntactically wrong tests using eval. With the upcoming
new memoizer this is necessary in order to postpone the syntax
check to the actual evaluation of the syntactically wrong form.
* tests/syntax.test: Added some test cases and modified one test
case.
is also the name like (pass-if (even? 2)).
(expect-fail): allow really simple tests where the test code is
also the test name like (expect-fail (even? 2)).
`export-syntax', `re-export' and `re-export-syntax' into the
`define-module' form. This is the recommended way of exporting
bindings.
* srfi-2.scm, srfi-4.scm, srfi-8.scm, srfi-9.scm, srfi-10.scm,
srfi-11.scm, srfi-14.scm, srfi-16.scm: Move module the system
directives `export', `export-syntax', `re-export' and
`re-export-syntax' into the `define-module' form. This is the
recommended way of exporting bindings.
* goops.scm, goops/active-slot.scm, goops/compile.scm,
goops/composite-slot.scm, goops/describe.scm, goops/dispatch.scm,
goops/old-define-method.scm, goops/save.scm, goops/util.scm: Move
module the system directives `export', `export-syntax',
`re-export' and `re-export-syntax' into the `define-module' form.
This is the recommended way of exporting bindings.
* slib.scm (array-indexes): New procedure.
(*features*): Extend. (Probably some of these options should be
set elsewhere.) (Thanks to Aubrey Jaffer.)
* and-let-star-compat.scm, and-let-star.scm, calling.scm,
channel.scm, common-list.scm, debug.scm, debugger.scm,
expect.scm, hcons.scm, lineio.scm, ls.scm, mapping.scm,
null.scm, optargs.scm, poe.scm, popen.scm, pretty-print.scm,
q.scm, r5rs.scm, rdelim.scm, regex.scm, runq.scm, safe-r5rs.scm,
safe.scm, session.scm, slib.scm, streams.scm, string-fun.scm,
syncase.scm, threads.scm: Move module the system directives
`export', `export-syntax', `re-export' and `re-export-syntax'
into the `define-module' form. This is the recommended way of
exporting bindings.
bucket if you use the test suite functions without a driver script.
(default-reporter): New variable.
(report): Send results to default-reporter if there are no registered
reporters.
(full-reporter): New function.
(user-reporter): Re-implemented in terms of full-reporter.