[latex3-commits] [latex3/latex3] main: Ensure that .tex files give same name whether ext. is included (20263691f)

github at latex-project.org github at latex-project.org
Thu May 11 14:56:40 CEST 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/20263691fb6f6bdabcacb74b1ab5c7138e32773c

>---------------------------------------------------------------

commit 20263691fb6f6bdabcacb74b1ab5c7138e32773c
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu May 11 13:56:40 2023 +0100

    Ensure that .tex files give same name whether ext. is included


>---------------------------------------------------------------

20263691fb6f6bdabcacb74b1ab5c7138e32773c
 l3kernel/l3file.dtx                           | 5 +++--
 l3kernel/testfiles/m3file001.lvt              | 4 ++++
 l3kernel/testfiles/m3file001.tlg              | 2 ++
 l3kernel/testfiles/support/filetest-tex-2.tex | 4 ++++
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index 6b8357812..c5e7fc1df 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -2950,8 +2950,9 @@
     \tl_if_blank:nTF {#2}
       {#3}
       {
-        \int_compare:nNnTF
-          {#4} = {#2}
+        \bool_lazy_or:nnTF
+          { \int_compare_p:nNn {#4} = {#2} }
+          { \int_compare_p:nNn {#2} = { -1 } }
           {#1}
           {#3}
       }
diff --git a/l3kernel/testfiles/m3file001.lvt b/l3kernel/testfiles/m3file001.lvt
index 9a16d38a1..f43893c8b 100644
--- a/l3kernel/testfiles/m3file001.lvt
+++ b/l3kernel/testfiles/m3file001.lvt
@@ -82,6 +82,10 @@
     \tl_log:N \l_A_tl
     \file_get_full_name:nN { filetest-tex } \l_A_tl
     \tl_log:N \l_A_tl
+    \file_get_full_name:nN { filetest-tex-2.tex } \l_A_tl
+    \tl_log:N \l_A_tl
+    \file_get_full_name:nN { filetest-tex-2 } \l_A_tl
+    \tl_log:N \l_A_tl
   }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/l3kernel/testfiles/m3file001.tlg b/l3kernel/testfiles/m3file001.tlg
index de9e996a5..7df92af4b 100644
--- a/l3kernel/testfiles/m3file001.tlg
+++ b/l3kernel/testfiles/m3file001.tlg
@@ -36,6 +36,8 @@ TEST 4: Getting the full name of files
 > \l_A_tl=filetest.
 > \l_A_tl=filetest-noname.
 > \l_A_tl=filetest-tex.tex.
+> \l_A_tl=filetest-tex-2.tex.
+> \l_A_tl=filetest-tex-2.tex.
 ============================================================
 ============================================================
 TEST 5: Loading a file
diff --git a/l3kernel/testfiles/support/filetest-tex-2.tex b/l3kernel/testfiles/support/filetest-tex-2.tex
new file mode 100644
index 000000000..a20ec11b2
--- /dev/null
+++ b/l3kernel/testfiles/support/filetest-tex-2.tex
@@ -0,0 +1,4 @@
+\ExplSyntaxOff
+This file is needed by m3file001.lvt, m3ior001.lvt and m3ior002.lvt:
+Please leave it alone!
+\ExplSyntaxOn
\ No newline at end of file





More information about the latex3-commits mailing list.