aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/lib.scm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpgscm: Emit JUnit-style XML reports.Justus Winter2017-04-241-0/+7
| | | | | | | | | | | | | | | | | | * tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file. * tests/gpgscm/lib.scm (string-translate): New function. * tests/gpgscm/main.c (main): Load new file. * tests/gpgscm/tests.scm (dirname): New function. (test-pool): Record execution times, emit XML report. (test): Record execution times, record log file name, emit XML report. (run-tests-parallel): Write XML report. (run-tests-sequential): Likewise. * tests/gpgscm/xml.scm: New file. * tests/gpgme/Makefile.am (CLEANFILES): Add 'report.xml'. * tests/gpgsm/Makefile.am: Likewise. * tests/migrations/Makefile.am: Likewise. * tests/openpgp/Makefile.am: Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Move 'trace' and 'stringify'.Justus Winter2017-04-241-0/+12
| | | | | | | * tests/gpgscm/tests.scm (trace, stringify): Move... * tests/gpgscm/lib.scm: ... here. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Add and use opcode for reversing a list in place.Justus Winter2017-04-101-4/+4
| | | | | | | | | * tests/gpgscm/lib.scm (string-split-pln): Use 'reverse!'. (string-rtrim): Likewise. * tests/gpgscm/opdefines.h (reverse!): New opcode. * tests/gpgscm/scheme.c (opexe_0): Handle new opcode. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Guard use of tagged expressions.Justus Winter2017-02-171-1/+1
| | | | | | | | | | | | | * tests/gpgscm/init.scm (vm-history-print): Check that the tag added to expressions when parsing source files matches the expected format. * tests/gpgscm/lib.scm (assert): Likewise. -- This makes the error handling more robust. We saw the assumption about the format of the tags being violated on one build system, and it obscured the view on the underlying problem. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Display location when assertions fail.Justus Winter2016-12-191-6/+9
| | | | | | | * tests/gpgscm/lib.scm (assert): Use location information if available. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Improve library functions.Justus Winter2016-12-131-25/+76
| | | | | | | | | | | | | * tests/gpgscm/tests.scm (absolute-path?): New function. (canonical-path): Use the new function. * tests/gpgscm/lib.scm (string-split-pln): New function. (string-indexp, string-splitp): Likewise. (string-splitn): Express using the above function. (string-ltrim, string-rtrim): Fix corner case. (list->string-reversed): New function. (read-line): Fix performance. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Expose seek and associated constants.Justus Winter2016-11-081-0/+8
| | | | | | | | * tests/gpgscm/ffi.c (do_seek): New function. (ffi_init): Expose 'seek' and 'SEEK_{SET,CUR,END}'. * tests/gpgscm/lib.scm: Document the new function. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Generalize splice to write to multiple sinks.Justus Winter2016-11-071-2/+3
| | | | | | | | * tests/gpgscm/ffi.c (ordinal_suffix): New function. (do_splice): Generalize splice to write to multiple sinks. * tests/gpgscm/lib.scm (splice): Document this fact. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Drop 'len' argument from splice.Justus Winter2016-11-071-0/+3
| | | | | | | * tests/gpgscm/ffi.c (do_splice): Drop 'len' argument, no-one uses it. * tests/gpgscm/lib.scm (splice): Document foreign function. Signed-off-by: Justus Winter <[email protected]>
* gpgscm,w32: Provide schemish file handling for binary files.Justus Winter2016-11-071-0/+14
| | | | | | | * tests/gpgscm/lib.scm (call-with-binary-input-file): New function. (call-with-binary-output-file): Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Add support for pseudo-random numbers.Justus Winter2016-11-071-0/+21
| | | | | | | | | | | | * tests/gpgscm/ffi.c (do_getpid): New function. (do_srandom): Likewise. (random_scaled): Likewise. (do_random): Likewise. (do_make_random_string): Likewise. (ffi_init): Expose the new functions. * tests/gpgscm/lib.scm: Document the new functions. Signed-off-by: Justus Winter <[email protected]>
* gpgscm,tests: Add new functions to the test environment.Justus Winter2016-11-031-0/+18
| | | | | | | | | | * tests/gpgscm/lib.scm (first, last, powerset): New functions. * tests/gpgscm/tests.scm (interactive-shell): New function. * tests/openpgp/Makefile.am (EXTRA_DIST): Add new file. * tests/openpgp/README: Document 'interactive-shell'. * tests/openpgp/shell.scm: New file. Signed-off-by: Justus Winter <[email protected]>
* tests: Improve handling of Windows newlines.Justus Winter2016-10-071-0/+9
| | | | | | | | | | * tests/gpgscm/lib.scm (string-split-newlines): New function. * tests/openpgp/default-key.scm: Use new function. * tests/openpgp/defs.scm: Likewise. * tests/openpgp/export.scm: Likewise. * tests/openpgp/import.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Make assert macro more accurate.Justus Winter2016-07-211-1/+2
| | | | | | | * tests/gpgscm/lib.scm (assert): Print the representation of the failed expression. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Improve test framework.Justus Winter2016-06-211-4/+0
| | | | | | | | | | | * tests/gpgscm/lib.scm (echo): Move... * tests/gpgscm/tests.scm (echo): ... here. (info, error, skip): And use echo here. (file-exists?): New function. (tr:spawn): Check that source exists and if the sink has been created. (tr:call-with-content): Hand in optional arguments. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Use native string searching functions.Justus Winter2016-06-211-43/+43
| | | | | | | | | | | | | | | | | * tests/gpgscm/ffi-private.h: Handle character arguments. * tests/gpgscm/ffi.c (do_string_index): New function. (do_string_rindex): Likewise. (do_string_contains): Likewise. (ffi_init): Define new functions. * tests/gpgscm/ffi.scm (ffi-define): New macro. * tests/gpgscm/lib.scm (string-index): Use native function, demonstrate behavior. (string-rindex): Likewise. (string-contains?): Likewise. Demonstrate behavior of various other functions. (read-all): Rework so that it can handle large files. Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Add a TinySCHEME-based test driver.Justus Winter2016-06-171-0/+163
* configure.ac: Add new component. * tests/Makefile.am: Likewise. * tests/gpgscm/Makefile.am: New file. * tests/gpgscm/ffi-private.h: Likewise. * tests/gpgscm/ffi.c: Likewise. * tests/gpgscm/ffi.h: Likewise. * tests/gpgscm/ffi.scm: Likewise. * tests/gpgscm/lib.scm: Likewise. * tests/gpgscm/main.c: Likewise. * tests/gpgscm/private.h: Likewise. * tests/gpgscm/repl.scm: Likewise. * tests/gpgscm/scheme-config.h: Likewise. * tests/gpgscm/t-child.c: Likewise. * tests/gpgscm/t-child.scm: Likewise. * tests/gpgscm/tests.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>