summaryrefslogtreecommitdiff
path: root/test-suite/tests/coding.test
AgeCommit message (Collapse)AuthorFilesLines
2014-01-17Arrange so that 'file-encoding' does not truncate the encoding name.Ludovic Courtès1-2/+8
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.
2013-04-14Using 'pass-if-equal' in coding.test.Mark H Weaver1-56/+56
* test-suite/tests/coding.test ("block comments", "line comments"): Use 'pass-if-equal'.
2013-04-07Do not scan for coding declarations in open-file.Mark H Weaver1-2/+2
* 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.
2011-03-31fix problems detecting coding: in block commentsAndy Wingo1-0/+104
* 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.