summaryrefslogtreecommitdiff
path: root/test-suite
AgeCommit message (Collapse)AuthorFilesLines
2012-01-30Merge commit '3d51e57cfb0404db568a6adfde2a346d3fd9907e'Andy Wingo6-23/+61
Conflicts: libguile/foreign.c libguile/hashtab.c module/ice-9/psyntax-pp.scm module/language/tree-il/compile-glil.scm
2012-01-30Merge commit '9b0975f1dc41ddd10d81fb5b0965b9e9a54ef37a'Andy Wingo5-30/+144
Conflicts: libguile/foreign.c module/ice-9/psyntax-pp.scm module/ice-9/psyntax.scm
2012-01-30Rename scm_call_varargs -> scm_callMark H Weaver1-8/+8
* libguile/eval.c, libguile/eval.h, doc/ref/api-evaluation.texi, test-suite/standalone/test-loose-ends.c, NEWS: Rename scm_call_varargs -> scm_call Suggested by Ludovic Courtès <ludo@gnu.org>
2012-01-30Implement scm_call_varargs and scm_call_{7,8,9}Mark H Weaver1-0/+17
* libguile/eval.c (scm_call_7, scm_call_8, scm_call_9, scm_call_varargs): New functions. * libguile/eval.h: Add prototypes. * doc/ref/api-evaluation.texi: Add documentation. * test-suite/standalone/test-loose-ends.c: Add tests. * NEWS: Add news entry.
2012-01-30Fix primitive-eval to return #<unspecified> for definitionsMark H Weaver1-0/+4
* module/ice-9/eval.scm (primitive-eval): Return #<unspecified> for definitions. Previously the variable object was returned. * test-suite/tests/eval.test (evaluator): Add test. * NEWS: Add news entry.
2012-01-30Fix 'local-eval' when the specified environment is a moduleMark H Weaver1-9/+11
* module/ice-9/local-eval.scm (local-wrap): Fix the (module? e) case, to reference the expression 'x' instead of the non-existent variable 'exp', as was previously done. Also use quasisyntax instead of quasiquote, so that the introduced 'lambda' is an identifier instead of a bare symbol, so that this will work in modules that have rebound 'lambda' to something else. * test-suite/tests/eval.test (local-eval): Make sure to test both 'local-eval' and 'local-compile' when the specified environment is a module.
2012-01-29paper over some "lexical vars are collectable" flakinessAndy Wingo1-11/+23
* test-suite/tests/gc.test ("gc"): Hack around flakiness in "lexical vars are collectable" on some architectures.
2012-01-26fix test-loose-endsAndy Wingo1-1/+4
* test-suite/standalone/test-loose-ends.c (test_scm_local_eval): Use ice-9 local-eval to get (the-environment).
2012-01-26Implement `local-eval', `local-compile', and `the-environment'Andy Wingo2-3/+108
* module/ice-9/local-eval.scm: New module (ice-9 local-eval) which exports `the-environment', `local-eval', and `local-compile'. * libguile/debug.c (scm_local_eval): New C function that calls the Scheme implementation of `local-eval' in (ice-9 local-eval). * libguile/debug.h (scm_local_eval): Add prototype. * doc/ref/api-evaluation.texi (Local Evaluation): Add documentation. * test-suite/tests/eval.test (local evaluation): Add tests. * test-suite/standalone/test-loose-ends.c (test_scm_local_eval): Add test. * module/Makefile.am: Add ice-9/local-eval.scm. Based on a patch by Mark H Weaver <mhw@netris.org>.
2012-01-26Add warnings for unsupported `simple-format' options.Ludovic Courtès1-26/+55
* module/language/tree-il/analyze.scm (format-analysis)[check-simple-format-args]: New procedure. Use it. Add support for applications of <module-ref>. * module/system/base/message.scm (%warning-types): Handle the `format simple-format' warning. * module/language/scheme/spec.scm (scheme)[make-default-environment]: Use `simple-format' as the default `format'. * test-suite/tests/tree-il.test ("warnings")["format"]: Explicitly use (@ (ice-9 format) format) where needed. ("simple-format"): New test prefix.
2012-01-25fix "lexical vars are collectable" testAndy Wingo1-3/+6
* test-suite/tests/gc.test ("gc"): Fix "lexical vars are collectable" test. (Previously, the binding was getting inlined, so we weren't testing what we meant to test. Besides that, the value was a constant, not a closure, so it wasn't collectable in the first place!)
2012-01-25fix values miscompilation in push context with RAAndy Wingo1-2/+19
* module/language/tree-il/compile-glil.scm (flatten-lambda-case): Fix miscompilation of `values' in a push context with RA. * test-suite/tests/tree-il.test: Add low-level test for this miscompilation.
2012-01-23FFI: Fix `set-pointer-finalizer!' to leave the type cell unchanged.Ludovic Courtès1-1/+7
This is a followup to 690a0112e55823aa8b862daeddcf44cea97e7917 ("Remove the "has finalizer?" bit from pointer objects.") * libguile/foreign.c (scm_set_pointer_finalizer_x): Leave the type cell unchanged. Before, `equal?' would break on pointers on which `set-pointer-finalizer!' had been called. * test-suite/tests/foreign.test ("make-pointer")["equal? modulo finalizer (set-pointer-finalizer!)"]: New test.
2012-01-23Adjust tests that relied on the output of the hash table printer.Ludovic Courtès1-8/+11
* libguile/hashtab.c (scm_i_hashtable_print): Use `SCM_UNPACK', not `SCM2PTR'. * test-suite/tests/hash.test: Adjust tests that rely on the output of the printer to just check for the suffix of the hash table's external representation.
2012-01-22Relax `asm-to-bytecode.test' for when target CPU == native CPU.Ludovic Courtès1-2/+18
* test-suite/tests/asm-to-bytecode.test (native-cpu, native-word-size): New procedures. (test-target): When the target is the native CPU, use the native word size instead of WORD-SIZE.
2012-01-20remove duplicate when/unless definitionsAndy Wingo1-7/+0
* module/rnrs/control.scm: * module/sxml/ssax.scm: * test-suite/lalr/common-test.scm: Remove local `when'/`unless' definitions.
2012-01-18Add `scm_c_value_ref' to allow access to multiple returned values from CMark H Weaver2-0/+76
Based on a patch by Julian Graham <julian@member.fsf.org> * libguile/values.c, libguile/values.h (scm_c_value_ref): New function. * doc/ref/api-control.texi (Multiple Values): Add documentation. * test-suite/standalone/test-scm-values.c: New test program. * test-suite/standalone/Makefile.am: Add test-scm-values test.
2012-01-16Skip `tr_TR' tests on Solaris 2.10.Ludovic Courtès1-3/+5
* test-suite/tests/i18n.test (under-turkish-utf8-locale-or-unresolved): Special-case Solaris 2.10.
2012-01-14Have `statprof.test' fail gracefully when samples could not be collected.Ludovic Courtès1-24/+30
* test-suite/tests/statprof.test ("statistical sample counts within expected range"): Throw unresolved when one of A-DATA, B-DATA, and C-DATA is #f, which means samples were not collected for this one.
2012-01-14Avoid non-portable `tail' argument in `test-guile-snarf'.Ludovic Courtès1-1/+17
* test-suite/standalone/test-guile-snarf (strip_first_line): New function. (snarf): Use it.
2012-01-12Disable statprof tests on platforms that lack `ITIMER_PROF' support.Ludovic Courtès1-2/+16
* test-suite/tests/statprof.test (when-implemented): New macro. ("statistical sample counts within expected range", "accurate call counting"): Use it.
2012-01-10Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo13-31/+195
Conflicts: libguile/__scm.h libguile/array-map.c libguile/procprop.c libguile/tags.h module/ice-9/deprecated.scm module/ice-9/psyntax-pp.scm module/ice-9/psyntax.scm test-suite/standalone/test-num2integral.c test-suite/tests/regexp.test
2012-01-10Merge commit 'f78a1ccede02ccad89d6c91a6b297f1f14a30907'Andy Wingo5-18/+125
2012-01-10Merge commit 'cc8afa2b361635953dfba7f10e4193b1f243a50f'Andy Wingo3-3/+21
Conflicts: module/ice-9/psyntax-pp.scm module/language/tree-il/peval.scm
2012-01-09Make sure `regexp-quote' tests use Unicode-capable string ports.Ludovic Courtès1-3/+12
* test-suite/tests/regexp.test (with-unicode): New macro. ("regexp-quote"): Wrap all `regexp-quote' calls in it. This fixes tests on machines where the default port encoding is US-ASCII.
2012-01-09i18n: Disable Turkish locale tests on FreeBSD 8.Ludovic Courtès1-2/+6
* test-suite/tests/i18n.test (under-turkish-utf8-locale-or-unresolved): Check %HOST-TYPE and throw `unresolved' on FreeBSD 8.
2012-01-09Fix loose typing in `test-scm-spawn-thread.c'.Ludovic Courtès1-2/+2
* test-suite/standalone/test-scm-spawn-thread.c (inner_main): Use `SCM2PTR' instead of a cast.
2012-01-09primitive-load returns the value(s) of the last expressionAndy Wingo1-3/+17
* libguile/load.c (scm_primitive_load): Return the values yielded from evaluating the last expression in the file. * test-suite/tests/load.test ("return value of `load'"): Add tests.
2012-01-09test-pthread-create-secondary: gc/gc.h, not gc/gc_version.hAndy Wingo1-1/+1
* test-suite/standalone/test-pthread-create-secondary.c: Include gc/gc.h. It works on libgc from git, and on 7.1.
2012-01-08Fix typo in `test-num2integral.c'.Ludovic Courtès1-2/+3
* test-suite/standalone/test-num2integral.c (out_of_range_handler): Use `scm_is_eq' when comparing KEY.
2012-01-08ftw: Add an `error' parameter to `file-system-fold'.Ludovic Courtès1-9/+138
* module/ice-9/ftw.scm (errno-if-exception): New macro. (file-system-fold): Add an `error' parameter. Wrap `opendir' and STAT calls in `errno-if-exception' and call ERROR when appropriate. (file-system-tree): Provide an `error' procedure. Return #f when FILE-NAME is unreadable. (scandir): Provide an `error' procedure. * test-suite/tests/ftw.test (%top-builddir): New variable. (make-file-tree, delete-file-tree): New procedures. (with-file-tree): New macro. ("file-system-fold"): Update tests to add an `error' procedure. ["ENOENT", "EACCES", "dangling symlink and lstat", "dangling symlink and stat"]: New tests. ("file-system-tree")["ENOENT"]: New test. ("scandir")["EACCES"]: New test. * doc/ref/misc-modules.texi (File Tree Walk): Update `file-system-fold' documentation.
2012-01-05Fix the exception type of the (begin) test.Ludovic Courtès1-3/+5
* test-suite/tests/syntax.test (exception:zero-expression-sequence): New variable. ("begin")["legal (begin)"]: Rename to "valid (begin)". ["illegal (begin)"]: Ditto. Expect `exception:zero-expression-sequence'.
2012-01-05Placate a number of `syntax-check' verifications.Ludovic Courtès4-4/+4
- "filesystem" -> "file system" - remove doubled words - use EXIT_* macros instead of literal numbers - update `syntax-check' exclusion files
2012-01-05Fix erroneous check in `set-procedure-properties!'.Ludovic Courtès1-2/+8
* libguile/procprop.c (scm_set_procedure_properties_x)[SCM_ENABLE_DEPRECATED == 1]: Pass arguments to `scm_assq' in the right order, and check its return value with `scm_is_true'. Reported by Mike Gran <spk121@yahoo.com>.
2012-01-05Raise an error for (begin) when `--disable-deprecated'.Ludovic Courtès1-3/+4
* module/ice-9/psyntax.scm (define-expansion-constructors)[begin-form]: Emit a syntax-violation error for empty sequences when --disable-deprecated. * test-suite/tests/syntax.test (pass-if-syntax-error): Fix typo in error message.
2012-01-04Rework c-api.test to use test libMike Gran1-13/+14
The failure path for the c-api.test had been to call the undefined function 'fail', instead of logging the error like the other tests. * test-suite/tests/c-api.test: modified
2011-12-22New array-map! and array-for-each testsDaniel Llorens1-1/+72
* ramap.test: New tests. - array-map! with noncompact arrays and more than one argument. - array-for-each with noncompact arrays and more than two arguments.
2011-12-22fix generalized-vector-{ref,set!} for slicesAndy Wingo1-1/+17
* libguile/generalized-vectors.c (scm_c_generalized_vector_ref): (scm_c_generalized_vector_set_x): Fix for the case in which base was not 1, lbnd was not 0, or inc was not 1. * test-suite/tests/arrays.test (array): Add a test. Thanks to Daniel Llorens for the report.
2011-12-22HTTP: Fix qstring writing of cache-extension valuesAndy Wingo1-0/+16
* module/web/http.scm ("Cache-Control"): Write string values using the default val writer, to get quoting correct. * test-suite/tests/web-http.test (pass-if-round-trip): New helper. ("general headers"): Check that cache-extensions round trip properly.
2011-12-22Extend handling of "Cache-Control" header.Daniel Hartwig1-0/+2
* module/web/http.scm ("Cache-Control"): Value for `max-stale' is optional. Strict validation for value-less directives (`no-store', etc.). String values optional for "cache-extension" directives. * test-suite/tests/web-http.test: Value for `max-stale' is optional.
2011-12-21peval fix: (cons 1 #nil) is not (list 1)Andy Wingo1-0/+5
* module/language/tree-il/peval.scm (peval): (cons FOO #nil) is not (cons FOO '()). * test-suite/tests/tree-il.test ("partial evaluation"): Add a test.
2011-12-21document invalidity of (begin) as expression; add back-compat shimAndy Wingo1-3/+4
* doc/ref/api-control.texi (begin): Update to distinguish between splicing begin and sequencing begin. * module/ice-9/psyntax.scm (expand-expr): Add a back-compatibility shim for `(begin)'. * module/ice-9/psyntax-pp.scm: Regenerate. * test-suite/tests/syntax.test: Update to run illegal (begin) test only if we are not including deprecated features.
2011-12-19ftw: Include sub-directories in the result of `scandir'.Ludovic Courtès1-0/+12
* module/ice-9/ftw.scm (scandir)[skip]: Keep NAME in the resulting list. * test-suite/tests/ftw.test ("scandir")["top-srcdir"]: New test.
2011-12-19Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo5-8/+143
Conflicts: libguile/feature.c m4/gnulib-cache.m4 module/ice-9/deprecated.scm module/language/tree-il/peval.scm
2011-12-19ftw: Clarify the behavior of `scandir' for flat files and unreadable dirs.Ludovic Courtès1-1/+4
* module/ice-9/ftw.scm (scandir)[leaf]: Only add NAME when RESULT is a pair. [down]: Ignore RESULT. Start with #f instead of the empty list. * test-suite/tests/ftw.test ("scandir")["flat file"]: New test. * doc/ref/misc-modules.texi (File Tree Walk): Update `scandir' documentation accordingly.
2011-12-18ftw: Add `scandir'.Ludovic Courtès1-0/+8
Suggested by Nala Ginrut <nalaginrut@gmail.com>. * module/ice-9/ftw.scm (scandir): New procedure. * test-suite/tests/ftw.test ("scandir"): New test prefix. * doc/ref/misc-modules.texi (File Tree Walk): Document `scandir'.
2011-12-15Arrange to convert command-line arguments from the right encoding.Ludovic Courtès2-0/+27
This is a temporary workaround for the 2.0 stable series. The next stable series should have an implicit `setlocale (LC_ALL, "")' call, which will make this unnecessary. * libguile/feature.c (progargs_fluid): Rename to... (scm_program_arguments_fluid): ... this. Update users. * libguile/feature.h (scm_program_arguments_fluid): New internal declaration. * libguile/init.c (invoke_main_func): Call `scm_i_set_boot_program_arguments' instead of `scm_set_program_arguments'. * libguile/script.c (locale_arguments_to_string_list, scm_i_set_boot_program_arguments): New functions. (scm_compile_shell_switches): Use `locale_arguments_to_string_list'. * libguile/script.h (scm_i_set_boot_program_arguments): New internal declaration. * test-suite/standalone/Makefile.am (check_SCRIPTS, TESTS): Add `test-command-line-encoding'. * test-suite/standalone/test-command-line-encoding: New file.
2011-12-15Use Gnulib's `localcharset', with local patches.Ludovic Courtès2-1/+4
This follows Bruno Haible's suggestion at <http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00055.html>. * m4/gnulib-cache.m4: Add `gl_LOCAL_DIR'; use `localcharset'. * Makefile.am (EXTRA_DIST): Add gnulib-local/lib/localcharset.[ch].diff. (TESTS_ENVIRONMENT): New variable. * gnulib-local/lib/localcharset.c.diff, gnulib-local/lib/localcharset.h.diff: New files. * test-suite/Makefile.am (TESTS_ENVIRONMENT): Add @LOCALCHARSET_TESTS_ENVIRONMENT@. * test-suite/standalone/Makefile.am (TESTS_ENVIRONMENT): Likewise.
2011-12-13Add `file-system-fold' and `file-system-tree' to (ice-9 ftw).Ludovic Courtès1-2/+96
* module/ice-9/ftw.scm (file-system-fold, file-system-tree): New procedures. * test-suite/tests/ftw.test (%top-srcdir, %test-dir): New variables. ("file-system-fold", "file-system-tree"): New test prefixes. * doc/ref/misc-modules.texi (File Tree Walk): Document `file-system-tree' and `file-system-fold'.
2011-12-13Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo2-0/+78
Conflicts: configure.ac