[latex3-commits] [git/LaTeX3-latex3-latex3] master: Make file sanitise/quote functions expandable (7eb94f41b)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Sep 2 01:12:54 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/7eb94f41b505f04ea5504f9846e8284526c7ee58
>---------------------------------------------------------------
commit 7eb94f41b505f04ea5504f9846e8284526c7ee58
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Sep 2 00:12:13 2019 +0100
Make file sanitise/quote functions expandable
>---------------------------------------------------------------
7eb94f41b505f04ea5504f9846e8284526c7ee58
l3kernel/l3file.dtx | 145 ++++++++++++++++++++++++--------
l3kernel/testfiles/m3expl001.luatex.tlg | 12 ++-
l3kernel/testfiles/m3expl001.ptex.tlg | 12 ++-
l3kernel/testfiles/m3expl001.tlg | 12 ++-
l3kernel/testfiles/m3expl001.uptex.tlg | 12 ++-
l3kernel/testfiles/m3expl001.xetex.tlg | 12 ++-
l3kernel/testfiles/m3expl003.luatex.tlg | 12 ++-
l3kernel/testfiles/m3expl003.ptex.tlg | 12 ++-
l3kernel/testfiles/m3expl003.tlg | 12 ++-
l3kernel/testfiles/m3expl003.uptex.tlg | 12 ++-
l3kernel/testfiles/m3expl003.xetex.tlg | 12 ++-
l3kernel/testfiles/m3file001.luatex.tlg | 24 +++---
l3kernel/testfiles/m3file001.lvt | 18 ++--
l3kernel/testfiles/m3file001.ptex.tlg | 24 +++---
l3kernel/testfiles/m3file001.tlg | 24 +++---
l3kernel/testfiles/m3file001.uptex.tlg | 24 +++---
l3kernel/testfiles/m3file001.xetex.tlg | 24 +++---
17 files changed, 275 insertions(+), 128 deletions(-)
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index 017c9954f..1a78fbf1f 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -1327,7 +1327,11 @@
% \begin{macrocode}
\cs_new_protected:Npn \iow_open:Nn #1#2
{
- \__kernel_file_name_sanitize:nN {#2} \l_@@_file_name_tl
+ \tl_set:Nx \l_@@_file_name_tl
+ {
+ \exp_args:Ne \__kernel_file_name_quote:n
+ { \__kernel_file_name_sanitize:n {#2} }
+ }
\iow_close:N #1
\seq_gpop:NNTF \g_@@_streams_seq \l_@@_stream_tl
{ \@@_open_stream:NV #1 \l_@@_file_name_tl }
@@ -2266,46 +2270,113 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\__kernel_file_name_sanitize:nN}
-% \begin{macro}{\@@_name_quote:nN}
-% \begin{macro}{\@@_name_sanitize_aux:n}
-% For converting a token list to a string where active characters are treated
-% as strings from the start. The logic to the quoting normalisation is the
-% same as used by \texttt{lualatexquotejobname}: check for balanced |"|, and
-% assuming they balance strip all of them out before quoting the entire name
-% if it contains spaces.
+% \begin{macro}[rEXP]{\__kernel_file_name_sanitize:n}
+% \begin{macro}[rEXP]{\__kernel_file_name_expand_loop:w}
+% \begin{macro}[rEXP]{\__kernel_file_name_expand_N_type:Nw}
+% \begin{macro}[rEXP]{\__kernel_file_name_expand_group:nw}
+% \begin{macro}[rEXP]{\__kernel_file_name_expand_space:w}
+% Expanding the file name without expanding active characters is done
+% using the same token-by-token approach as for example case changing.
+% The finale outcome only need be \texttt{e}-type expandable, so there
+% is no need for the shuffling that is seen in other locations.
% \begin{macrocode}
-\cs_new_protected:Npn \__kernel_file_name_sanitize:nN #1#2
+\cs_new:Npn \__kernel_file_name_sanitize:n #1
{
- \group_begin:
- \seq_map_inline:Nn \l_char_active_seq
- {
- \tl_set:Nx \l_@@_internal_tl { \iow_char:N ##1 }
- \char_set_active_eq:NN ##1 \l_@@_internal_tl
- }
- \tl_set:Nx \l_@@_internal_tl {#1}
- \exp_args:NNNV \group_end:
- \str_set:Nn #2 \l_@@_internal_tl
+ \__kernel_file_name_expand_loop:w #1
+ \q_recursion_tail \q_recursion_stop
}
-\cs_new_protected:Npn \@@_name_quote:nN #1#2
+\cs_new:Npn \__kernel_file_name_expand_loop:w #1 \q_recursion_stop
{
- \str_set:Nx #2 {#1}
- \int_if_even:nF
- { 0 \tl_map_function:NN #2 \@@_name_quote_aux:n }
+ \tl_if_head_is_N_type:nTF {#1}
+ { \__kernel_file_name_expand_N_type:Nw }
{
- \__kernel_msg_error:nnx
- { kernel } { unbalanced-quote-in-filename } {#2}
+ \tl_if_head_is_group:nTF {#1}
+ { \__kernel_file_name_expand_group:nw }
+ { \__kernel_file_name_expand_space:w }
}
- \tl_remove_all:Nn #2 { " }
- \tl_if_in:NnT #2 { ~ }
- { \str_set:Nx #2 { " \exp_not:V #2 " } }
+ #1 \q_recursion_stop
}
-\cs_new:Npn \@@_name_quote_aux:n #1
- { \token_if_eq_charcode:NNT #1 " { + 1 } }
+\cs_new:Npn \__kernel_file_name_expand_N_type:Nw #1
+ {
+ \quark_if_recursion_tail_stop:N #1
+ \bool_lazy_and:nnTF
+ { \token_if_expandable_p:N #1 }
+ {
+ \bool_not_p:n
+ {
+ \bool_lazy_any_p:n
+ {
+ { \token_if_protected_macro_p:N #1 }
+ { \token_if_protected_long_macro_p:N #1 }
+ { \token_if_active_p:N #1 }
+ }
+ }
+ }
+ { \exp_after:wN \__kernel_file_name_expand_loop:w #1 }
+ {
+ \token_to_str:N #1
+ \__kernel_file_name_expand_loop:w
+ }
+ }
+\cs_new:Npx \__kernel_file_name_expand_group:nw #1
+ {
+ \c_left_brace_str
+ \exp_not:N \__kernel_file_name_expand_loop:w
+ #1
+ \c_right_brace_str
+ }
+\exp_last_unbraced:NNo
+ \cs_new:Npx \__kernel_file_name_expand_space:w \c_space_tl
+ {
+ \c_space_tl
+ \exp_not:N \__kernel_file_name_expand_loop:w
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[rEXP]{\__kernel_file_name_quote:n}
+% \begin{macro}[rEXP]{\__kernel_file_name_quote_auxi:nnnw}
+% \begin{macro}[rEXP]{\__kernel_file_name_quote_auxii:nnn}
+% \begin{macro}[rEXP]{\__kernel_file_name_quote_auxiii:nw}
+% Quoting file name uses basically the same approach as for
+% \texttt{luaquotejobname}: count the |"| tokens, remove them then
+% re-add at the extremities.
+% \begin{macrocode}
+\cs_new:Npn \__kernel_file_name_quote:n #1
+ {
+ \__kernel_file_name_quote_auxi:nnnw {#1} { 0 } { }
+ #1 " \q_recursion_tail " \q_recursion_stop
+ }
+\cs_new:Npn \__kernel_file_name_quote_auxi:nnnw #1#2#3#4 "
+ {
+ \quark_if_recursion_tail_stop_do:nn {#4}
+ { \__kernel_file_name_quote_auxii:nnn {#1} {#2} {#3} }
+ \__kernel_file_name_quote_auxi:nnnw {#1} { #2 + 1 } { #3#4 }
+ }
+\cs_new:Npn \__kernel_file_name_quote_auxii:nnn #1#2#3
+ {
+ \int_if_even:nT {#2}
+ {
+ \__kernel_msg_expandable_error:nnn
+ { kernel } { unbalanced-quote-in-filename } {#1}
+ }
+ \__kernel_file_name_quote_auxiii:nw {#3} #3 ~ \q_nil \q_stop
+ }
+\cs_new:Npn \__kernel_file_name_quote_auxiii:nw #1 #2 ~ #3 \q_stop
+ {
+ \quark_if_nil:nTF {#3}
+ { #2 }
+ { "#2"}
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{variable}{\c_@@_marker_tl}
% The same idea as the marker for rescanning token lists: this pair of
@@ -2386,7 +2457,8 @@
\cs_generate_variant:Nn \file_get_full_name:nN { V }
\prg_new_protected_conditional:Npnn \file_get_full_name:nN #1#2 { T , F , TF }
{
- \__kernel_file_name_sanitize:nN {#1} \l_@@_base_name_tl
+ \tl_set:Nx \l_@@_base_name_tl
+ { \__kernel_file_name_sanitize:n {#1} }
\@@_get_full_name_search:nN { } \use:n
\seq_map_inline:Nn \l_file_search_path_seq
{ \@@_get_full_name_search:nN { ##1 / } \seq_map_break:n }
@@ -2424,9 +2496,11 @@
\cs_generate_variant:Nn \file_get_full_name:nNTF { V }
\cs_new_protected:Npn \@@_get_full_name_search:nN #1#2
{
- \@@_name_quote:nN
- { \tl_to_str:n {#1} \l_@@_base_name_tl }
- \l_@@_full_name_tl
+ \tl_set:Nx \l_@@_full_name_tl
+ {
+ \exp_args:Ne \__kernel_file_name_quote:n
+ { \tl_to_str:n {#1} \l_@@_base_name_tl }
+ }
\__kernel_ior_open:No \g_@@_internal_ior \l_@@_full_name_tl
\ior_if_eof:NF \g_@@_internal_ior { #2 { \prg_break: } }
}
@@ -2573,9 +2647,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \__kernel_file_missing:n #1
{
- \__kernel_file_name_sanitize:nN {#1} \l_@@_base_name_tl
\__kernel_msg_error:nnx { kernel } { file-not-found }
- { \l_@@_base_name_tl }
+ { \__kernel_file_name_sanitize:n {#1} }
}
% \end{macrocode}
% \end{macro}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 4eb0e45fe..66f4ca912 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -2895,9 +2895,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 01e2f2227..8a2ab7924 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -3149,9 +3149,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 9ed1f198f..210655630 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -3149,9 +3149,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 233f3459a..ed19761f6 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -3149,9 +3149,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index b0eae5b02..c8f1026c7 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -2893,9 +2893,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 4eb0e45fe..66f4ca912 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -2895,9 +2895,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index 01e2f2227..8a2ab7924 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -3149,9 +3149,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 9ed1f198f..210655630 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -3149,9 +3149,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 233f3459a..ed19761f6 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -3149,9 +3149,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index b0eae5b02..c8f1026c7 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -2893,9 +2893,15 @@ Defining \l__file_ext_str on line ...
Defining \l__file_name_str on line ...
Defining \l_file_search_path_seq on line ...
Defining \l__file_tmp_seq on line ...
-Defining \__kernel_file_name_sanitize:nN on line ...
-Defining \__file_name_quote:nN on line ...
-Defining \__file_name_quote_aux:n on line ...
+Defining \__kernel_file_name_sanitize:n on line ...
+Defining \__kernel_file_name_expand_loop:w on line ...
+Defining \__kernel_file_name_expand_N_type:Nw on line ...
+Defining \__kernel_file_name_expand_group:nw on line ...
+Defining \__kernel_file_name_expand_space:w on line ...
+Defining \__kernel_file_name_quote:n on line ...
+Defining \__kernel_file_name_quote_auxi:nnnw on line ...
+Defining \__kernel_file_name_quote_auxii:nnn on line ...
+Defining \__kernel_file_name_quote_auxiii:nw on line ...
Defining \c__file_marker_tl on line ...
Defining \file_get:nnN on line ...
Defining \file_get:nnNT on line ...
diff --git a/l3kernel/testfiles/m3file001.luatex.tlg b/l3kernel/testfiles/m3file001.luatex.tlg
index 77a324e59..09c076531 100644
--- a/l3kernel/testfiles/m3file001.luatex.tlg
+++ b/l3kernel/testfiles/m3file001.luatex.tlg
@@ -168,27 +168,31 @@ filetest-endinput.txt
============================================================
TEST 8: File name quoting
============================================================
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-! LaTeX3 Error: Unbalanced quotes in file name '"foo."bar"'.
-For immediate help type H <return>.
- ...
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Unbalanced quotes in file name '"foo."bar"'.
l. ... }
-File names must contain balanced numbers of quotes (").
-> \l_tmpa_str=foo.bar.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
============================================================
diff --git a/l3kernel/testfiles/m3file001.lvt b/l3kernel/testfiles/m3file001.lvt
index 524f23ab5..4b13a5aef 100644
--- a/l3kernel/testfiles/m3file001.lvt
+++ b/l3kernel/testfiles/m3file001.lvt
@@ -126,18 +126,12 @@
\TEST { File~name~quoting }
{
- \__file_name_quote:nN { foo.bar } \l_tmpa_str
- \tl_show:N \l_tmpa_str
- \__file_name_quote:nN { "foo.bar" } \l_tmpa_str
- \tl_show:N \l_tmpa_str
- \__file_name_quote:nN { "foo."bar"" } \l_tmpa_str
- \tl_show:N \l_tmpa_str
- \__file_name_quote:nN { "foo."bar" } \l_tmpa_str
- \tl_show:N \l_tmpa_str
- \__file_name_quote:nN { foo~.bar } \l_tmpa_str
- \tl_show:N \l_tmpa_str
- \__file_name_quote:nN { "foo~.bar" } \l_tmpa_str
- \tl_show:N \l_tmpa_str
+ \tl_set:Nx \l_tmpa_tl { \__kernel_file_name_quote:n { foo.bar } } \tl_show:N \l_tmpa_tl
+ \tl_set:Nx \l_tmpa_tl { \__kernel_file_name_quote:n { "foo.bar" } } \tl_show:N \l_tmpa_tl
+ \tl_set:Nx \l_tmpa_tl { \__kernel_file_name_quote:n { "foo."bar"" } } \tl_show:N \l_tmpa_tl
+ \tl_set:Nx \l_tmpa_tl { \__kernel_file_name_quote:n { "foo."bar" } } \tl_show:N \l_tmpa_tl
+ \tl_set:Nx \l_tmpa_tl { \__kernel_file_name_quote:n { foo~.bar } } \tl_show:N \l_tmpa_tl
+ \tl_set:Nx \l_tmpa_tl { \__kernel_file_name_quote:n { "foo~.bar" } } \tl_show:N \l_tmpa_tl
}
\TEST { Getting~file~information }
diff --git a/l3kernel/testfiles/m3file001.ptex.tlg b/l3kernel/testfiles/m3file001.ptex.tlg
index a6aeea704..cb3deba37 100644
--- a/l3kernel/testfiles/m3file001.ptex.tlg
+++ b/l3kernel/testfiles/m3file001.ptex.tlg
@@ -169,27 +169,31 @@ filetest-endinput.txt
============================================================
TEST 8: File name quoting
============================================================
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-! LaTeX3 Error: Unbalanced quotes in file name '"foo."bar"'.
-For immediate help type H <return>.
- ...
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Unbalanced quotes in file name '"foo."bar"'.
l. ... }
-File names must contain balanced numbers of quotes (").
-> \l_tmpa_str=foo.bar.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
============================================================
diff --git a/l3kernel/testfiles/m3file001.tlg b/l3kernel/testfiles/m3file001.tlg
index cbcb368d7..2d136e436 100644
--- a/l3kernel/testfiles/m3file001.tlg
+++ b/l3kernel/testfiles/m3file001.tlg
@@ -163,27 +163,31 @@ filetest-endinput.txt
============================================================
TEST 8: File name quoting
============================================================
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-! LaTeX3 Error: Unbalanced quotes in file name '"foo."bar"'.
-For immediate help type H <return>.
- ...
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Unbalanced quotes in file name '"foo."bar"'.
l. ... }
-File names must contain balanced numbers of quotes (").
-> \l_tmpa_str=foo.bar.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
============================================================
diff --git a/l3kernel/testfiles/m3file001.uptex.tlg b/l3kernel/testfiles/m3file001.uptex.tlg
index 091a20260..0e0b47d75 100644
--- a/l3kernel/testfiles/m3file001.uptex.tlg
+++ b/l3kernel/testfiles/m3file001.uptex.tlg
@@ -169,27 +169,31 @@ filetest-endinput.txt
============================================================
TEST 8: File name quoting
============================================================
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-! LaTeX3 Error: Unbalanced quotes in file name '"foo."bar"'.
-For immediate help type H <return>.
- ...
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Unbalanced quotes in file name '"foo."bar"'.
l. ... }
-File names must contain balanced numbers of quotes (").
-> \l_tmpa_str=foo.bar.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
============================================================
diff --git a/l3kernel/testfiles/m3file001.xetex.tlg b/l3kernel/testfiles/m3file001.xetex.tlg
index c0fb290f5..b719636e6 100644
--- a/l3kernel/testfiles/m3file001.xetex.tlg
+++ b/l3kernel/testfiles/m3file001.xetex.tlg
@@ -163,27 +163,31 @@ filetest-endinput.txt
============================================================
TEST 8: File name quoting
============================================================
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str=foo.bar.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-! LaTeX3 Error: Unbalanced quotes in file name '"foo."bar"'.
-For immediate help type H <return>.
- ...
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Unbalanced quotes in file name '"foo."bar"'.
l. ... }
-File names must contain balanced numbers of quotes (").
-> \l_tmpa_str=foo.bar.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+> \l_tmpa_tl=foo.bar.
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
-> \l_tmpa_str="foo .bar".
+> \l_tmpa_tl="foo".
<recently read> }
l. ... }
============================================================
More information about the latex3-commits
mailing list