summaryrefslogtreecommitdiff
path: root/test-suite/standalone/test-scm-c-bind-keyword-arguments.c
AgeCommit message (Collapse)AuthorFilesLines
2018-06-20Update license notices in all C filesAndy Wingo1-17/+17
Update to newest recommended license notices from the FSF. Everything stays LGPLv3+ except guile-readline which is GPLv3+.
2018-06-20Remove (C) from copyright statementsAndy Wingo1-1/+2
As the FSF advises, 'There is no legal significance to using the three-character sequence “(C)”, but it does no harm.' It does take up space though! For that reason, we remove it here from our C files.
2017-03-01Remove extraneous debugging output in testAndy Wingo1-1/+0
* test-suite/standalone/test-scm-c-bind-keyword-arguments.c (missing_value_error_handler): Remove debugging write.
2017-02-28Better errors for odd-length keyword argsAndy Wingo1-12/+10
* libguile/vm-engine.c (bind-kwargs): * libguile/vm.c (vm_error_kwargs_missing_value): * libguile/eval.c (error_missing_value) (prepare_boot_closure_env_for_apply): Adapt to mirror VM behavior. * libguile/keywords.c (scm_c_bind_keyword_arguments): Likewise. * module/ice-9/eval.scm (primitive-eval): Update to error on (foo #:kw) with a "Keyword argument has no value" instead of the horrible "odd argument list length". Also adapts to the expected args format for the keyword-argument-error exception printer in all cases. Matches 1.8 optargs behavior also. * test-suite/standalone/test-scm-c-bind-keyword-arguments.c (test_missing_value): (missing_value_error_handler): Update test. * test-suite/tests/optargs.test: Add tests.
2014-03-20tests: Add #undef NDEBUG when using <assert.h>.Ludovic Courtès1-1/+3
* test-suite/standalone/test-loose-ends.c, test-suite/standalone/test-num2integral.c, test-suite/standalone/test-round.c, test-suite/standalone/test-scm-c-bind-keyword-arguments.c, test-suite/standalone/test-scm-c-read.c, test-suite/standalone/test-scm-values.c, test-suite/standalone/test-smob-mark.c, test-suite/standalone/test-srfi-4.c: Add #undef NDEBUG.
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-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 Weaver1-0/+201
* 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.