1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

2086 commits

Author SHA1 Message Date
Michael Gran
fe505e1a2a encoding test tries to delete a file that is not closed
On Windows, deleting a file on an open port does not succeed

* test-suite/tests/ports.test ("%default-port-encoding, wrong encoding"):
  ensure port is closed before deleting
2021-01-21 14:32:53 -08:00
Michael Gran
1a6eaba436 Use mkdtemp to simplify repl server test
* test-suite/tests/00-repl-server.test (make-tempdir): removed
  (call-with-repl-server): use mkdtemp instead of make-tempdir
2021-01-21 10:41:10 -08:00
Michael Gran
32bf48e4b7 Replace mutating mkdtemp! with non-mutating mkdtemp
* doc/ref/posix.texi: replace mkdtemp! and scm_mkdtemp_x documentation
    with documentation for mkdtemp and scm_mkdtemp
* libguile/filesys.c (scm_mkdtemp_x): procedure mkdtemp! removed
    (scm_mkdtemp): new procedure mkdtemp
* libguile/filesys.h: Remove declaration for scm_mkdtemp_x.  New declaration
    scm_mkdtemp.
* test-suite/tests/filesys.test: Remove mkdtemp! tests.  Add tests
    for mkdtemp.
2021-01-21 10:33:08 -08:00
Michael Gran
d98e1d5e4f New procedure mkdtemp! to create unique temporary directory
* configure.ac (AC_CHECK_FUNCS): add mkdtemp! test
* doc/ref/posix.texi: document mkdtemp!
* libguile/filesys.c (scm_mkdtemp_x): new function
* libguile/filesys.h: new declaration for scm_mkdtemp_x
* test-suite/tests/filesys.test: add tests for mkdtemp!

Adapted from a patch by Rob Browning.
2021-01-19 05:58:14 -08:00
Rob Browning
d0d1f68794 scm_i_make_transcoded_port: fix mode for input/output ports
* libguile/r6rs-ports.c (scm_i_make_transcoded_ports): make sure to
  include SCM_RDNG for input/output ports.

Thanks to Göran Weinholt for reporting the problem.

Closes: 41045
2021-01-17 13:25:42 -06:00
Rob Browning
f1547e1d58 (scheme base) member: return #f, not (), for no match
* module/scheme/base.scm (member): Match the r7rs requirement, as assoc
  already does.

Thanks to Erik Dominikus for reporting the problem.

Closes: 43304
2021-01-17 13:25:40 -06:00
Andy Wingo
9d5978a756 New warnings: -Wuse-before-definition, -Wnon-idempotent-definition
* module/ice-9/boot-9.scm (%auto-compilation-options): Add
  use-before-definition and non-idempotent-definition.
* module/language/tree-il/analyze.scm (<use-before-def-info>): New
  analysis info.
  (make-use-before-definition-analysis): New function.
  (goops-toplevel-definition): Move down.
  (unbound-variable-analysis, macro-use-before-definition): Remove, as
  they are subsumed by use-before-def.  There are some deprecated
  bindings though.
  (make-analyzer): Rework to allow for use-before-def analysis to handle
  multiple
* module/system/base/message.scm (%warning-types): Add handlers for the
  new warning types.
* test-suite/tests/tree-il.test: Add tests.
* doc/ref/api-evaluation.texi (Compilation): Update.
2021-01-07 10:26:33 +01:00
Andy Wingo
e9c5a1719b Move copy-tree to (ice-9 copy-tree); deprecate main binding
* doc/ref/api-data.texi (List Constructors):
* doc/ref/api-utility.texi (Copying): Update docs to mention module.
* libguile.h: Remove trees.h inclusion.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
  (DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Remove trees.c,
  trees.h, and related files.
* libguile/init.c (scm_i_init_guile): Remove trees.h and the
  scm_init_trees call.
* libguile/trees.c:
* libguile/trees.h: Remove.
* module/Makefile.am (SOURCES): Add ice-9/copy-tree.scm.
* module/ice-9/copy-tree.scm: New file.
* module/ice-9/deprecated.scm (copy-tree*): Export as copy-tree,
  proxying to (ice-9 copy-tree).
* module/system/repl/common.scm:
* module/web/client.scm:
* test-suite/tests/elisp.test:
* test-suite/tests/srfi-1.test:
* module/oop/goops/save.scm: Use (ice-9 copy-tree).
* test-suite/Makefile.am (SCM_TESTS): Add copy-tree.test.
* test-suite/tests/copy-tree.test: New file; test pulled from
  eval.test.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_copy_tree): Deprecate.
2020-09-10 21:57:21 +02:00
Daniel Llorens
de5d1a7f99 Fix bug #42713: srfi-64: Reset test-runner-current if done
Reported by Jérémy Korwin-Zmijowski
(https://lists.gnu.org/archive/html/bug-guile/2020-08/msg00010.html).

Fix from
7cf4c01039:

Apply fix from Per Bothner.

In Per's words:

  * testing.scm (%test-end): Reset test-runner-current if done.
  This fixes bug "Loading test source file multiple time without having
  report incrementing" reported to srfi-64 mailing list.

  * srfi-64-test.scm: Update due to recent srfi-64 implementation change.
2020-08-05 12:46:27 +02:00
Ludovic Courtès
c7f76d94da popen: 'open-process' returns unbuffered ports.
* module/ice-9/popen.scm (open-process)[unbuffered, fdes-pair]: New
procedures.
Use them.  Return unbuffered ports.
* test-suite/tests/popen.test ("open-pipe*"): New test prefix.
2020-06-19 20:59:04 +02:00
Ludovic Courtès
1ab2105339 web: Accept URI host names consisting only of hex digits.
Fixes <https://bugs.gnu.org/40582>.
Reported by Julien Lepiller <julien@lepiller.eu>.

Previously, a host part consisting of hex digits would be mistaken as an
IPv6 address and rejected by 'valid-host?'.

* module/web/uri.scm (ipv6-regexp): Add colon.
* test-suite/tests/web-uri.test ("string->uri")["xyz://abc/x/y/z"]: New
test.
* NEWS: Update.
2020-06-18 17:06:29 +02:00
Ludovic Courtès
a43aa1bc79 texinfo: Add basic support for @w{...}.
* module/texinfo.scm (texi-command-specs): Add 'w'.
(space-significant?): Add it.
* module/texinfo/html.scm (tag-replacements): Add 'w'.
* test-suite/tests/texinfo.test ("test-texinfo->stexinfo"): Add test.
2020-06-18 00:30:30 +02:00
Jan (janneke) Nieuwenhuizen
52809cc630 read: Use "invalid" rather than "illegal".
* libguile/read.c (scm_read_string_like_syntax): All characters are
permitted by law; some aren't valid in certain contexts.
* test-suite/tests/reader.test: Replace occurrences of "illegal" by
"invalid".
* test-suite/tests/strings.test: Likewise.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-06-18 00:30:11 +02:00
Ludovic Courtès
e7398643b2 tests: Avoid dependency on util-linux for 'rev'.
* test-suite/tests/popen.test ("open-process", "pipeline"): Use 'tr'
instead of 'rev' to avoid an extra dependency on util-linux.
2020-06-04 15:38:12 +02:00
Ludovic Courtès
f32ba444dd 'peval' test uses (language tree-il peval).
Fixes an unbound variable error introduced in
2c07a32ad8.

* test-suite/tests/peval.test: Use (language tree-il peval).
(peval): Remove.
2020-05-17 17:55:30 +02:00
Ludovic Courtès
9971861851 Use 'pass-if-equal' for 'pipeline' tests.
* test-suite/tests/popen.test ("open-process", "piped-process")
("piped-process: with output", "pipeline"): Use 'pass-if-equal'.
2020-05-16 22:36:19 +02:00
Rutger van Beusekom
786fbcd327 popen: Add 'pipeline' procedure.
* libguile/posix.c (scm_open_process): Remove.
(scm_piped_process): Add to replace open_process.
* module/ice-9/popen.scm (pipe->fdes): Add to convert pipe pair to fdes pair.
(open-process): Add open-process for backwards compatibility.
(pipeline): Add to implement a pipeline using piped-process.
* doc/ref/posix.texi (Pipes): Document it.
* test-suite/tests/popen.test ("open-process")
("piped-process", "piped-process: with output")
("pipeline"): New tests.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-05-16 22:36:19 +02:00
Andy Wingo
7df3f3414b More robust reduction of equal? and eqv?
* module/language/tree-il/primitives.scm (expand-eq): Just expand out to
  binary comparisons.  Also expand eq?, which was missing.  Leave
  strength reduction to peval.
  (character-comparison-expander): Move down, as it depends on <, <=,
  and so on.
* module/language/tree-il/peval.scm (peval): Robustly reduce equal? and
  eqv?.
* test-suite/tests/peval.test ("partial evaluation"): Expect fixnum
  comparison to reduce to eq?.
  ("eqv?", "equal?"): A new battery of tests.
* test-suite/tests/tree-il.test ("primitives"): Remove reduction tests.
2020-05-13 15:51:58 +02:00
Ludovic Courtès
b1bdd791ce Zero the initial file port revealed count.
Fixes <https://bugs.gnu.org/41204>.
Reported by Caleb Ristvedt <caleb.ristvedt@cune.org>.

Until now, Guile would leak the file descriptors of all the file ports
not explicitly closed.

* libguile/fports.c (scm_i_fdes_to_port): Initialize fp->revealed.
* test-suite/tests/ports.test ("initial revealed count")
("non-revealed port is closed"): New tests.
("close-port & revealed port"): Check (port-revealed port).
("revealed port fdes not closed"): Likewise.
2020-05-12 14:58:30 +02:00
Ludovic Courtès
2ba61b8aea tests: Don't use a guardian when testing for GC'd ports.
This is a followup to 1008ea3154.

* test-suite/tests/ports.test ("non-revealed port is closed"): Don't use
a guardian.
2020-05-12 14:44:53 +02:00
Andy Wingo
e9c0f3071d Warning and optimization levels always small integers
* module/language/tree-il/analyze.scm (make-analyzer): Expect an int for
  optimization level.
* module/scripts/compile.scm (%options, show-warning-help): No more
  -Wnone / Wall; use -W0 or -W9 instead.
* module/system/base/compile.scm (level-validator): Validate small int.
  (compute-analyzer, add-default-optimizations): Likewise.
* test-suite/tests/optargs.test (without-compiler-warnings):
* test-suite/tests/tree-il.test (call-with-warnings): Parameterize level
  to 0, not #f.
* bootstrap/Makefile.am (GUILE_WARNINGS): Use -W0, not -Wnone.
2020-05-08 16:35:04 +02:00
Andy Wingo
116f94d661 Add language-specific analysis pass to compiler infrastructure
* module/system/base/compile.scm (compute-analyzer): Compute analyzer to
  run on expressions before the compiler runs.
  (add-default-optimizations): Flesh out; still a stub.a
  (read-and-compile, compile, compile-and-load, compile-file): Default
  warning and optimization levels.
  (default-warning-level): New parameter, defaulting to 1.
  (default-optimization-level): New parameter, defaulting to 2.
  Currently unused.
* module/system/base/language.scm (<language>): Add
  optimizations-for-level and analyzer fields.
* module/language/tree-il/compile-bytecode.scm (compile-bytecode):
* module/language/tree-il/compile-cps.scm (optimize-tree-il): No need to
  run warnings passes here; compilers infrastructure will run them.
* module/language/tree-il/spec.scm (tree-il): Define make-analyzer as
  analyzer.
* module/language/tree-il/analyze.scm (make-analyzer): New exported
  procedure.
  (%warning-passes): New private variable.
* .dir-locals.el: Add with-test-prefix/c&e indent mode.
* test-suite/tests/cross-compilation.test:
* test-suite/tests/optargs.test:
* test-suite/tests/tree-il.test: Adjust to disable default warnings.
2020-05-08 15:39:41 +02:00
Andy Wingo
167350db21 Ensure <prompt> handler is values handler
* module/language/tree-il/primitives.scm (call-with-prompt): Only pass
  "values handlers" as handler: lambdas with only req and rest args, and
  only one clause.
* module/language/tree-il/compile-cps.scm (canonicalize): Remove
  eta-conversion pass here.
* test-suite/tests/peval.test ("partial evaluation"): Adapt test.
2020-05-04 10:53:29 +02:00
Andy Wingo
bfd38b8577 bitvector-count-bits replaces bit-count*
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_count_bits): New function.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_count_star): Deprecate.
* module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count* with
  bitvector-count-bits.
* test-suite/tests/bitvectors.test: Update.
2020-04-29 11:14:17 +02:00
Andy Wingo
f897efa9f1 bitvector-flip-all-bits! replaces bit-invert!
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_flip_all_bits_x): New function.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_invert_x): Deprecate.
* module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace
  bit-invert! with bitvector-flip-all-bits!.
* module/system/vm/frame.scm (available-bindings): Use the new
  interface.
* test-suite/tests/bitvectors.test: Update.
2020-04-18 22:16:31 +02:00
Andy Wingo
d7fea13453 bitvector-set-all-bits! / bitvector-clear-all-bits! replace bitvector-fill!
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_set_all_bits_x)
  (scm_c_bitvector_clear_all_bits_x): New functions.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bitvector_fill_x): Deprecate.
* module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace
  bitvector-fill! with bitvector-set-all-bits! /
  bitvector-clear-all-bits!.
* module/system/vm/disassembler.scm (static-opcode-set): Use
  bitvector-set-bit!.
* module/system/vm/frame.scm (available-bindings): Use the new
  interfaces.
* test-suite/tests/bitvectors.test: Update.
2020-04-15 22:14:25 +02:00
Andy Wingo
8110061e64 bitvector-set-bit! / bitvector-clear-bit! replace bitvector-set!
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/array-handle.h (bitvector_set_x, scm_array_get_handle): Adapt
  to bitvector changes.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_set_bit_x)
  (scm_c_bitvector_clear_bit_x): New functions.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bitvector_set_x): Deprecate.
* module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace
  bitvector-set! with bitvector-set-bit! / bitvector-clear-bit!.
* module/system/vm/disassembler.scm (static-opcode-set): Use
  bitvector-set-bit!.
* module/system/vm/frame.scm (compute-defs-by-slot, available-bindings):
  Use bitvector-set-bit!.
* test-suite/tests/bitvectors.test: Update.
2020-04-14 22:40:43 +02:00
Andy Wingo
d804177be4 bitvector-bit-set? / bitvector-bit-clear? replace bitvector-ref
This is an opportunity to make a new interface that can be more
efficient in 3.0 (because no generic array support), easier to read (no
need for 'not'), and more consistent with other bitvector interfaces.

* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/array-handle.h (bitvector_ref, scm_array_get_handle): Adapt
  to bitvector changes.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_bit_is_set)
  (scm_c_bitvector_bit_is_clear): New functions.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bitvector_ref): Deprecate.
* module/ice-9/sandbox.scm (bitvector-bindings): Replace
  bitvector-ref with bitvector-bit-set? / bitvector-bit-clear?.
* module/system/vm/disassembler.scm (instruction-has-fallthrough): Use
  bitvector-bit-clear?.
* test-suite/tests/bitvectors.test: Update.
2020-04-14 22:18:02 +02:00
Andy Wingo
ff9979b6bc Replace bit-set*! with bitvector-set-bits! / bitvector-clear-bits!
The old name was wonky and hard to read: you almost always pass a
literal as the value to set, so better to make separate functions.

* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_bitvector_set_bits_x)
  (scm_bitvector_clear_bits_x): New functions.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_set_star_x): Deprecate.
* module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace
  bit-set*! with bitvector-set-bits! / bitvector-clear-bits!.
* module/system/vm/frame.scm (available-bindings, compute-killv): Use
  bitvector-set-bits! and bitvector-clear-bits!.
* test-suite/tests/bitvectors.test: Update.
2020-04-13 22:06:56 +02:00
Andy Wingo
06709d77b9 Replace bit-position with bitvector-position
The old name was wonky and had bad argument order.

* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_bitvector_position): New function.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_position): Deprecate.
* module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-position
  with bitvector-position.
* module/language/cps/intset.scm (bitvector->intset): Use
  bitvector-position.
* module/system/vm/frame.scm (available-bindings): Use
  bitvector-position.
* test-suite/tests/bitvectors.test ("bitvector-position"): Add test.
2020-04-12 22:39:55 +02:00
Andy Wingo
cae74359de Replace bit-count with bitvector-count
The old name was wonky and had bad argument order.

* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (VALIDATE_BITVECTOR): New helper.
  (scm_bitvector_count): New function.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_count): Deprecate.
* module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count with
  bitvector-count.
* module/srfi/srfi-60.scm: No need to #:replace bit-count.
* module/system/vm/frame.scm (available-bindings): Use bitvector-count.
* test-suite/tests/bitvectors.test ("bitvector-count"): Add test.
2020-04-12 22:17:22 +02:00
Andy Wingo
24a34074ef Deprecate bitvector-ref on array slices
* NEWS: Update.
* doc/ref/api-data.texi (Bit Vectors): Update documentation on bit-set*!
  and bit-count*.
* libguile/bitvectors.c: Add a to-do list.
  (scm_c_bitvector_ref, scm_c_bitvector_set_x, scm_bitvector_fill_x)
  (scm_bitvector_to_list, scm_bit_count, scm_bit_position):
  Issue deprecation warnings when used on array slices.
  (scm_list_to_bitvector): Simplify.
  (scm_bit_set_star_x, scm_bit_count_star): Deprecate arrays as target
  bitvectors, and also use of u32vector as selection vector.
* libguile/bitvectors.h:
* libguile/deprecated.h:
* libguile/deprecated.c (scm_istr2bve): Deprecate.
* test-suite/tests/bitvectors.test ("bit-count*"): Remove test of u32
  selectors.
2020-04-12 21:36:30 +02:00
Linus Björnstam
5f60eb6bb5 Add SRFI-171 to guile
This adds SRFI-171 (transducers) to guile.

The two guile-specific additions are powerful transducers which can be
used to generalize transducers like tsegment. They are hard to get
right, but powerful and useful enough to warrant inclusion.

 * doc/ref/srfi-modules.texi: added srfi-171 section
 * module/Makefile.am (SOURCES):
 * module/srfi/srfi-171.scm:
 * module/srfi/srfi-171/meta.scm: Add SRFI-171
 * module/srfi/srfi-171/gnu.scm: Add 2 guile-specific extensions.
 * test-suite/Makefile.am (SCM_TESTS):
 * test-suite/tests/srfi-171.test: Add tests.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-25 22:44:27 +01:00
Ludovic Courtès
87bf38c93a tests: Skip web server test when thread support is missing.
* test-suite/tests/web-server.test ("GET with keep-alive"): Throw
'unresolved when not (provided? 'threads).
2020-03-21 18:26:31 +01:00
Ludovic Courtès
100257ec3e Actually run '00-repl-server.test'.
This is a followup to ddcab06f20.  Until
now the tests would always be marked as unresolved because TMPDIR was
removed before the client and server had been started.

* test-suite/tests/00-repl-server.test (call-with-repl-server): Remove
initial call to 'rmdir'.  Add calls to 'delete-file' and 'rmdir' in the
unwind handler.
2020-03-07 16:03:44 +01:00
Ludovic Courtès
d49453259b Fix expansion of 'error' primitive with a non-constant argument.
Fixes <https://bugs.gnu.org/39509>.
Reported by Klaus Stehle <klaus.stehle@uni-tuebingen.de>.

* module/language/tree-il/primitives.scm (error): Remove extra "?"
argument when the first argument is not a constant.
* test-suite/tests/tree-il.test ("primitives")["error"]: New test
prefix.
2020-03-06 18:06:51 +01:00
Ludovic Courtès
5d96e42158 Add 'hash' test for keywords.
This is a followup to 8b3cad6183.

* test-suite/tests/hash.test ("hash")["keyword"]: New test prefix.
2020-03-06 17:17:41 +01:00
Ludovic Courtès
ff14b77ff5 texinfo: Properly render @acronym in plain text.
Fixes <https://bugs.gnu.org/37846>.
Reported by Christopher Baines <mail@cbaines.net>.

* module/texinfo/plain-text.scm (acronym): New procedure.
(tag-handlers): Change 'acro' handle to ACRONYM, and add 'acronym'
handler.
* test-suite/tests/texinfo.plain-text.test ("stexi->plain-text")
["acronym", "recursive acronym"]: New tests.
2020-01-29 15:19:37 +01:00
Ludovic Courtès
c4b2bd3781 texinfo: Add '*line-width*' fluid to control line wrapping.
* module/texinfo/plain-text.scm (*line-width*): New variable.
(wrap*): Honor it.
* doc/ref/texinfo.texi (texinfo plain-text): Document it.
* test-suite/tests/texinfo.plain-text.test: New file.
* test-suite/Makefile.am (SCM_TESTS): Add it.
2020-01-29 15:19:37 +01:00
Rob Browning
ddcab06f20 00-repl-server.test: don't use fixed path for socket
* test-suite/tests/00-repl-server.test (make-tempdir): Add.
(call-with-repl-server): Store socket in a make-tempdir dir.
2020-01-23 19:16:01 -06:00
Tim Gesthuizen
1733efe236 srfi-11: Do not expose variables to later clauses
The current implementation of srfi-11s let-values allows later clauses
to access and modify variables bound in earlier clauses when the clause
is not a proper list.

* module/srfi/srfi-11.scm (let-values): Fix switched variable names.
* test-suite/tests/srfi-11.test (let-values): Add test checking that the
  variable cannot be changed in later clauses.
2020-01-12 22:18:41 +01:00
Rob Browning
2446e7dc29 Respect thread local fluid defaults
Previously (fluid-ref (make-thread-local-fluid #t)) would return #f via
scm_fluid_ref because the internal scm_hashq_ref would return #f when
the fluid had not been set, and that was interpreted as an actual value
for the fluid.

Instead, just pass the fluid default as the default for the hash table
lookups so that we don't need a second step to determine if the fluid
was set.

Thanks to Andrew Gierth for tracking down the problem.
2020-01-12 22:04:29 +01:00
Andy Wingo
cf53854d42 Fix peval bug that ignored excess args
* module/language/tree-il/peval.scm (peval): Fix arity check for type
  confusion (empty value of "rest" in this context was (), not #f).  The
  effect was that we'd silently allow extra arguments to inlined calls.
  Thanks to Christopher Lam for the report!  Fixes #38617.
* test-suite/tests/peval.test ("partial evaluation"): Add a test.
2020-01-12 21:11:09 +01:00
Daniel Llorens
6cfee36543 New function string-replace-substring in (ice-9 string-fun)
By A. Wingo in
https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00058.html.

* module/ice-9/string-fun.scm (string-replace-substring): As stated.
* doc/ref/api-data.texi: Document the new function.
* test-suite/tests/strings.test: Test.
2020-01-06 09:44:01 +01:00
Andy Wingo
72a2c742f6 Add R7RS xfails due to a restriction in hungry-eol-escapes (#38239)
* test-suite/tests/r7rs.test ("https://bugs.gnu.org/38239"): Add more
  xfails.
2019-11-16 22:29:41 +01:00
Andy Wingo
78ea5c51b5 Add R7RS xfails due to Guile's ( . 42) syntax extension
* test-suite/tests/r7rs.test ("https://bugs.gnu.org/38238"): Add new
  xfails.
2019-11-16 22:19:30 +01:00
Andy Wingo
609c386d89 Add R7RS xfails due to https://bugs.gnu.org/38237 (i/o exn types)
* test-suite/tests/r7rs.test ("https://bugs.gnu.org/38237"): Add more
  expected failures.
2019-11-16 22:12:57 +01:00
Andy Wingo
fcbf0d15b2 Add R7RS XFAILs due to https://bugs.gnu.org/38236 (datum labels)
* test-suite/tests/r7rs.test (failing-test-with-exception): New form.
  ("https://bugs.gnu.org/38236"): Mark a couple more xfails.
2019-11-16 22:07:04 +01:00
Andy Wingo
ddc03c070e Add expected failure for R7RS test due to https://bugs.gnu.org/38235
* test-suite/tests/r7rs.test (failing-test): New form.
  ("https://bugs.gnu.org/38235"): New failing test.
2019-11-16 21:43:34 +01:00
Andy Wingo
b494a7f793 Add r7rs test
* test-suite/tests/r7rs.test: New file, based on tests from Chibi
  Scheme, by Alex Shinn.  There are a few failing tests that a followup
  will fix.
2019-11-16 21:09:51 +01:00