[latex3-commits] [latex3/latex3] main: Issue error if 'raw' file is not found (11b83b534)
github at latex-project.org
github at latex-project.org
Fri May 26 09:22:47 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/11b83b53411ec3d2d7c41a9ca15dbbb90eed637a
>---------------------------------------------------------------
commit 11b83b53411ec3d2d7c41a9ca15dbbb90eed637a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon May 22 18:32:55 2023 +0100
Issue error if 'raw' file is not found
>---------------------------------------------------------------
11b83b53411ec3d2d7c41a9ca15dbbb90eed637a
l3kernel/l3file.dtx | 14 ++++++++++----
l3kernel/testfiles/m3file001.tlg | 16 ++++++++++++++++
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index cdc665c5c..0964354ab 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -3410,14 +3410,19 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\file_input_raw:n, \@@_input_raw:n}
+% \begin{macro}{\file_input_raw:n, \@@_input_raw:nn}
% No error checking, no tracking.
% \begin{macrocode}
\cs_new:Npn \file_input_raw:n #1
- { \exp_args:Ne \@@_input_raw:n { \file_full_name:n {#1} } }
-\cs_new:Npx \@@_input_raw:n #1
+ { \exp_args:Ne \@@_input_raw:nn { \file_full_name:n {#1} } {#1} }
+\cs_new:Npx \@@_input_raw:nn #1#2
{
- \exp_not:N \tl_if_blank:nF {#1}
+ \exp_not:N \tl_if_blank:nTF {#1}
+ {
+ \exp_not:N \exp_args:Nnne \exp_not:N \msg_expandable_error:nnn
+ { kernel } { file-not-found }
+ { \exp_not:N \__kernel_file_name_sanitize:n {#2} }
+ }
{
\exp_not:N \tex_input:D
\sys_if_engine_luatex:TF
@@ -3425,6 +3430,7 @@
{ \exp_not:N \__kernel_file_name_quote:n {#1} \scan_stop: }
}
}
+\exp_args_generate:n { nne }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/testfiles/m3file001.tlg b/l3kernel/testfiles/m3file001.tlg
index 590c1529b..788559be7 100644
--- a/l3kernel/testfiles/m3file001.tlg
+++ b/l3kernel/testfiles/m3file001.tlg
@@ -60,6 +60,22 @@ search path or in the LaTeX search path.
TEST 6: Loading a file raw
============================================================
(filetest.txt) (filetest.txt)
+! Use of \??? doesn't match its definition.
+<argument> \???
+ ! LaTeX Error: File 'NotAFile.xxx.yyy.zzz' not found.
+l. ... }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
+! Use of \??? doesn't match its definition.
+<argument> \???
+ ! LaTeX Error: File 'NotAFile.xxx.yyy.zzz' not found.
+l. ... }
+If you say, e.g., `\def\a1{...}', then you must always
+put `1' after `\a', since control sequence names are
+made up of letters only. The macro here has not been
+followed by the required stuff, so I'm ignoring it.
============================================================
============================================================
TEST 7: Loading a file conditionally
More information about the latex3-commits
mailing list.