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

5 commits

Author SHA1 Message Date
Eli Zaretskii
7c848fe572 Make temporary file in coding.test work on MS-Windows.
* test-suite/tests/coding.test (with-temp-file): Instead of
  hard-coding "/tmp" as the temporary directory, use $TMPDIR or
  $TEMP from the environment, and fall back on "/tmp" if none of
  those 2 is defined.
2014-08-13 18:41:15 +03:00
Ludovic Courtès
3ff8a9d6ff Arrange so that 'file-encoding' does not truncate the encoding name.
Fixes <http://bugs.gnu.org/16463>.
Reported by Sree Harsha Totakura <sreeharsha@totakura.in>.

* libguile/read.c (ENCODING_NAME_MAX_SIZE): New macro.
  (SCM_ENCODING_SEARCH_SIZE): Change to 500 + ENCODING_NAME_MAX_SIZE.
  (scm_i_scan_for_encoding): Return NULL if there's less than
  ENCODING_NAME_MAX_SIZE bytes once "coding: *" has been read.
* test-suite/tests/coding.test ("line
  comment")["http://bugs.gnu.org/16463"]: New test.
2014-01-17 18:18:41 +01:00
Mark H Weaver
f5b2eea6a3 Using 'pass-if-equal' in coding.test.
* test-suite/tests/coding.test ("block comments", "line comments"):
  Use 'pass-if-equal'.
2013-04-14 02:29:25 -04:00
Mark H Weaver
9a334eb3ab Do not scan for coding declarations in open-file.
* libguile/fports.c (scm_open_file): Do not scan for coding
  declarations.  Replace 'use_encoding' local variable with
  'binary'.  Update documentation string.

* module/ice-9/psyntax.scm (include): Add the same file-encoding
  logic that's used in compile-file and scm_primitive_load.

* module/ice-9/psyntax-pp.scm: Regenerate.

* doc/ref/api-io.texi (File Ports): Update docs.

* test-suite/tests/ports.test: Change "open-file HONORS file coding
  declarations" test to "open-file IGNORES file coding declaration".

* test-suite/tests/coding.test (scan-coding): Use 'file-encoding' to
  scan for the encoding, since 'open-input-file' no longer does so.
2013-04-07 10:11:41 -04:00
Andy Wingo
8a12aeb919 fix problems detecting coding: in block comments
* libguile/read.c (scm_i_scan_for_encoding): Fix for coding on first
  line #! and for !# immediately following the coding.

* test-suite/Makefile.am:
* test-suite/tests/coding.test: Add tests.
2011-03-31 14:46:21 +02:00