summaryrefslogtreecommitdiff
path: root/test-suite/standalone
AgeCommit message (Collapse)AuthorFilesLines
2013-07-16Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver4-22/+68
Conflicts: libguile/keywords.c libguile/vm.c
2013-06-16tests: Don't rely on $TMPDIR and /tmp on Windows.Ludovic Courtès1-1/+12
* test-suite/standalone/test-unwind.c (check_ports)[__MINGW32__]: Use $TEMP, $TMP, or / as the value for TMPDIR. Patch by Eli Zaretskii <eliz@gnu.org>.
2013-06-16tests: Use double quotes around shell arguments, for Windows.Ludovic Courtès1-3/+5
* test-suite/standalone/test-system-cmds (test-system-cmd): Use double quotes around shell arguments. Reported by Eli Zaretskii <eliz@gnu.org>.
2013-06-10Fix tests for 'scm_c_bind_keyword_arguments'.Mark H Weaver1-17/+48
* test-suite/standalone/test-scm-c-bind-keyword-arguments.c (error_handler): Remove function. (unrecognized_keyword_error_handler, invalid_keyword_error_handler, odd_length_error_handler): New functions. (test_scm_c_bind_keyword_arguments): Use new error handler functions.
2013-04-14tests: Use shell constructs that /bin/sh on Solaris 10 can understand.Ludovic Courtès1-1/+3
Partly fixes <http://bugs.gnu.org/14042>. Reported by Marc Girod <marc.girod@gmail.com> * test-suite/standalone/test-language: Use a shell construct that /bin/sh on Solaris 10 can understand.
2013-04-14Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver2-0/+208
Conflicts: GUILE-VERSION libguile/array-map.c libguile/fports.h libguile/gc.h libguile/inline.h libguile/ports.c libguile/ports.h libguile/print.c libguile/r6rs-ports.c libguile/read.c test-suite/tests/00-socket.test
2013-04-06Fix indentation in test-scm-c-bind-keyword-arguments.c.Mark H Weaver1-7/+7
* test-suite/standalone/test-scm-c-bind-keyword-arguments.c (test_invalid_keyword): Fix indentation.
2013-04-06Implement 'scm_c_bind_keyword_arguments'.Mark H Weaver2-0/+208
* libguile/keywords.c (scm_keyword_argument_error): New variable. (scm_c_bind_keyword_arguments): New API function. * libguile/keywords.h (enum scm_keyword_arguments_flags): New enum. (scm_t_keyword_arguments_flags): New typedef. (scm_c_bind_keyword_arguments): New prototype. * doc/ref/api-data.texi (Coding With Keywords, Keyword Procedures): Add documentation. * test-suite/standalone/test-scm-c-bind-keyword-arguments.c: New file. * test-suite/standalone/Makefile.am: Add test-scm-c-bind-keyword-arguments test.
2013-03-28Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver1-7/+12
2013-03-28tests: Skip `test-pthread-create-secondary' except on Linux-based systems.Ludovic Courtès1-7/+12
* test-suite/standalone/test-pthread-create-secondary.c: Skip on non-Linux-based systems.
2013-03-28Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver5-2/+182
Conflicts: configure.ac libguile/deprecated.c libguile/deprecated.h libguile/filesys.h libguile/fluids.c libguile/fports.c libguile/gc.c libguile/guile.c libguile/numbers.c libguile/objcodes.c libguile/r6rs-ports.c libguile/smob.c libguile/socket.c libguile/threads.h module/language/scheme/decompile-tree-il.scm module/language/tree-il/peval.scm test-suite/tests/syncase.test
2013-03-10Add standalone test for smob markingMike Gran2-0/+139
* test-suite/standalone/Makefile.am (TESTS, check_PROGRAMS): add test-smob-mark (test_smob_mark_SOURCES, test_smob_mark_CFLAGS, test_smob_mark_LDADD): new variables * test-suite/standalone/test-smob-mark.c: new file
2013-03-07GUILE_INSTALL_LOCALE=1 during buildAndy Wingo1-2/+2
* doc/ref/Makefile.am (autoconf-macros.texi): * libguile/Makefile.am (snarf2checkedtexi): * module/Makefile.am (ice-9/psyntax-pp.scm.gen, ice-9/psyntax-pp.go): * test-suite/Makefile.am (GUILE_AUTO_COMPILE): * test-suite/standalone/Makefile.am (GUILE_INSTALL_LOCALE): * test-suite/vm/Makefile.am (TESTS_ENVIRONMENT): * am/guilec (.scm.go): Set GUILE_INSTALL_LOCALE to 1 during the build. Fixes bug 12887.
2013-02-28Support calling foreign functions of 10 arguments or more.Mark H Weaver2-0/+32
* libguile/foreign.c (OBJCODE_HEADER, META_HEADER, META): Change these into higher-order macros. (GEN_CODE): New higher-order macro based on 'CODE'. (M_STATIC, M_DYNAMIC): New macros. (CODE): Reimplement using 'GEN_CODE' and 'M_STATIC'. (make_objcode_trampoline): New static function. (large_objcode_trampolines, large_objcode_trampolines_mutex): New static variables. (get_objcode_trampoline): New static function. (cif_to_procedure): Use 'get_objcode_trampoline'. * test-suite/standalone/test-ffi-lib.c (test_ffi_sum_many): New function. * test-suite/standalone/test-ffi: Add test.
2013-02-27tests: Avoid missing missing-prototype warning with <fenv.h> on glibc 2.17.Ludovic Courtès1-1/+10
* test-suite/standalone/test-round.c: Avoid missing-prototype warning with <fenv.h> on glibc 2.17.
2013-01-31Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo4-1/+54
Conflicts: module/ice-9/psyntax-pp.scm module/ice-9/psyntax.scm module/language/bytecode/spec.scm module/language/tree-il/spec.scm
2013-01-26Add tests for `--language'.Ludovic Courtès4-1/+54
* test-suite/standalone/Makefile.am (top_srcdir): Add `top_srcdir'. (check_SCRIPTS, TESTS): Add `test-language'. (EXTRA_DIST): Add `test-language.el' and `test-language.js'. * test-suite/standalone/test-language, test-suite/standalone/test-language.el, test-suite/standalone/test-language.js: New files.
2012-04-26Merge commit 'd10f7b572c0ca1ccef87f9c46069daa30946e0cf'Andy Wingo1-0/+69
Conflicts: libguile/smob.c libguile/smob.h test-suite/tests/tree-il.test
2012-04-04Fix scm_to_utf8_stringn once and for all; optimize; add testsMark H Weaver1-0/+69
* libguile/strings.c (scm_to_utf8_stringn): Fix another new bug in this recent comedy of errors: pass the size of the preallocated buffer to u32_to_u8. Arrange to call 'scm_i_string_wide_chars' and 'scm_i_string_length' only once each. Rename local variables for improved code clarity. * test-suite/standalone/test-conversion.c (test_to_utf8_stringn): New function to test scm_to_utf8_stringn.
2012-02-23Merge remote-tracking branch 'local-2.0/stable-2.0'Andy Wingo2-1/+24
Conflicts: module/language/tree-il/analyze.scm
2012-02-18Don't fail when locale env. vars specify a dot-less locale name.Ludovic Courtès2-1/+24
Fixes <http://bugs.gnu.org/10742>. Reported by Alírio Eyng <alirioeyng@ig.com.br>. * gnulib-local/lib/localcharset.c.diff (environ_locale_charset): Change to set CODESET to "" when LOCALE lacks a dot. Return "ISO-8859-1" when CODESET is the empty string. * lib/localcharset.c: Update. * test-suite/standalone/Makefile.am (check_SCRIPTS): Add `test-command-line-encoding2'. (TESTS): Likewise. * test-suite/standalone/test-command-line-encoding2: New file.
2012-02-08Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-0/+17
Conflicts: GUILE-VERSION libguile/gc-malloc.c libguile/ports.c
2012-02-02Implement scm_to_pointerMark H Weaver1-0/+17
* libguile/foreign.c, libguile/foreign.h (scm_to_pointer): New C function. * test-suite/standalone/test-loose-ends.c: Add test.
2012-01-30Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-1/+35
Conflicts: libguile/debug.h module/ice-9/psyntax-pp.scm module/ice-9/psyntax.scm module/language/tree-il/peval.scm module/language/tree-il/primitives.scm
2012-01-30Merge commit '9b0975f1dc41ddd10d81fb5b0965b9e9a54ef37a'Andy Wingo3-1/+93
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-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 Wingo1-1/+15
* 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-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-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-10Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo3-5/+5
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-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-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.
2011-12-19Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo2-0/+28
Conflicts: libguile/feature.c m4/gnulib-cache.m4 module/ice-9/deprecated.scm module/language/tree-il/peval.scm
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ès1-0/+1
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-10-10Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-0/+33
Does not include psyntax regeneration. Conflicts: module/ice-9/psyntax-pp.scm module/language/tree-il/peval.scm test-suite/tests/tree-il.test
2011-10-09New functions scm_is_exact and scm_is_inexactMike Gran1-0/+33
* doc/ref/api-data.texi (Exact and Inexact Numbers): doc for scm_is_exact and scm_is_inexact * libguile/numbers.c (scm_is_exact, scm_is_inexact): new functions * libguile/numbers.h: declarations for scm_is_exact and scm_is_inexact * test/suite/standalone/test-conversion.c (test_is_exact, test_is_inexact): new tests
2011-09-29Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo2-0/+85
This was a pretty big merge involving a fair amount of porting, especially to peval and its tests. I did not update psyntax-pp.scm, that comes in the next commit. Conflicts: module/ice-9/boot-9.scm module/ice-9/psyntax-pp.scm module/language/ecmascript/compile-tree-il.scm module/language/tree-il.scm module/language/tree-il/analyze.scm module/language/tree-il/inline.scm test-suite/tests/tree-il.test
2011-09-10fix scm_to_latin1_stringn for substringsAndy Wingo2-0/+85
* libguile/strings.c (scm_to_latin1_stringn): Fix for substrings. * test-suite/standalone/Makefile.am: * test-suite/standalone/test-scm-to-latin1-string.c: Add test case. Thanks to David Hansen for the bug report and test case, and Stefan Israelsson Tampe for the fix.
2011-06-30Merge remote-tracking branch 'local-2.0/stable-2.0'Andy Wingo1-7/+7
Conflicts: libguile/deprecated.c module/ice-9/psyntax-pp.scm
2011-06-20Placate GCC in `test-ffi-lib.c'.Ludovic Courtès1-7/+7
This fixes warnings saying "this decimal constant is unsigned only in ISO C90". * test-suite/standalone/test-ffi-lib.c (test_ffi_u32_, test_ffi_u32_u8, test_ffi_u32_s64, test_ffi_s64_s64, test_ffi_u64_u8, test_ffi_u64_s64): Mark constants as unsigned.
2011-05-25Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo6-0/+53
Conflicts: libguile/procprop.c
2011-05-25out-of-tree build fixAndy Wingo2-1/+2
* test-suite/standalone/Makefile.am (GUILE_AUTO_COMPILE): Add srcdir to the environment. * test-suite/standalone/test-import-order: Look for the modules in the srcdir. Fixes out-of-tree builds.
2011-05-21fix define-module orderingAndy Wingo6-0/+52
* module/ice-9/boot-9.scm (define-module): Fix to load the #:use-module clauses in the order in which they appear in the define-module form. Thanks to Jan Nieuwenhuizen for the report. * test-suite/standalone/test-import-order: Add new test that define-module and use-modules resolve the interface in the right order. * test-suite/standalone/Makefile.am: * test-suite/standalone/test-import-order-a.scm: * test-suite/standalone/test-import-order-b.scm: * test-suite/standalone/test-import-order-c.scm: * test-suite/standalone/test-import-order-d.scm: Aux files.
2011-05-15remove SCM_I_LLONG and SCM_I_ULLONG limit definesAndy Wingo1-10/+11
* test-suite/standalone/test-num2integral.c (test_long_long): (test_ulong_long): Replace SCM_I_LLONG and SCM_I_ULLONG defines with their counterparts from limits.h. * libguile/__scm.h: Remove SCM_I_LLONG and SCM_I_ULLONG limit defines.
2011-05-15fix type errors in test suiteAndy Wingo2-2/+3
* test-suite/standalone/test-num2integral.c (out_of_range_handler): Fix SCM used as a truth value. * test-suite/standalone/test-scm-spawn-thread.c (inner_main): Use SCM2PTR here.
2011-04-25Use `scm_with_guile' in `test-pthread-create'.Ludovic Courtès1-5/+11
* test-suite/standalone/test-pthread-create.c (inner_main): New function. (main): Call it within `scm_with_guile', instead of using `scm_init_guile'. This improves portability--e.g., `GC_get_stack_base', used by `scm_init_guile', failed on Darwin up to BDW-GC 7.1alpha4 included (thanks, Mark, for the hint.)