[latex3-commits] [git/LaTeX3-latex3-latex3] expandable-file-parse: Add test for expandable file parsing (0ebadf151)
PhelypeOleinik
tex.phelype at gmail.com
Wed Jun 24 21:10:15 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : expandable-file-parse
Link : https://github.com/latex3/latex3/commit/0ebadf151e96986339726f7d35627bc883559412
>---------------------------------------------------------------
commit 0ebadf151e96986339726f7d35627bc883559412
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date: Wed Jun 24 16:10:15 2020 -0300
Add test for expandable file parsing
>---------------------------------------------------------------
0ebadf151e96986339726f7d35627bc883559412
l3kernel/testfiles/m3file001.lvt | 35 ++++++++++++++++++++++++++++++++++
l3kernel/testfiles/m3file001.ptex.tlg | 31 +++++++++++++++++++++++++++---
l3kernel/testfiles/m3file001.tlg | 31 +++++++++++++++++++++++++++---
l3kernel/testfiles/m3file001.uptex.tlg | 31 +++++++++++++++++++++++++++---
l3kernel/testfiles/m3file001.xetex.tlg | 31 +++++++++++++++++++++++++++---
5 files changed, 147 insertions(+), 12 deletions(-)
diff --git a/l3kernel/testfiles/m3file001.lvt b/l3kernel/testfiles/m3file001.lvt
index 9a6347b53..e4fedc1c4 100644
--- a/l3kernel/testfiles/m3file001.lvt
+++ b/l3kernel/testfiles/m3file001.lvt
@@ -134,6 +134,41 @@
\test:n { "//~" }
}
+\TEST { Expandable~file~name~parsing }
+ {
+ \OMIT
+ \str_new:N \l_tmpc_str
+ \cs_set_protected:Npn \test:n #1
+ {
+ \exp_last_unbraced:Nx \test:nnn
+ { \file_parse_full_name:n {#1} }
+ }
+ \cs_set_protected:Npn \test:nnn #1 #2 #3
+ { \TYPE { Path:~"#1",~ Name:~"#2",~ Ext:~ "#3" } }
+ \TIMO
+ \test:n { }
+ \test:n { ~ }
+ \test:n { . }
+ \test:n { / }
+ \test:n { test }
+ \test:n { test.tex }
+ \test:n { "test.tex" }
+ \test:n { test.file.tex }
+ \test:n { test~file.tex }
+ \test:n { ~test~file.tex }
+ \test:n { "~test~file.tex" }
+ \test:n { bar/test.tex }
+ \test:n { bar/baz/test.tex }
+ \test:n { bar/baz~bob/test.tex }
+ \test:n { /test.tex }
+ \test:n { /baz/ }
+ \test:n { /bar/baz~bob/test.tex }
+ \test:n { "bar/baz~bob/test.tex" }
+ \test:n { //baz/...a.b. }
+ \test:n { "//." }
+ \test:n { "//~" }
+ }
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\TEST { File~listing }
{ \file_log_list: }
diff --git a/l3kernel/testfiles/m3file001.ptex.tlg b/l3kernel/testfiles/m3file001.ptex.tlg
index 29a6f3ce6..009bbeef3 100644
--- a/l3kernel/testfiles/m3file001.ptex.tlg
+++ b/l3kernel/testfiles/m3file001.ptex.tlg
@@ -156,7 +156,32 @@ Path: "/", Name: "", Ext: "."
Path: "/", Name: " ", Ext: ""
============================================================
============================================================
-TEST 8: File listing
+TEST 8: Expandable file name parsing
+============================================================
+Path: "", Name: "", Ext: ""
+Path: "", Name: "", Ext: ""
+Path: "", Name: "", Ext: "."
+Path: "/", Name: "", Ext: ""
+Path: "", Name: "test", Ext: ""
+Path: "", Name: "test", Ext: ".tex"
+Path: "", Name: "test", Ext: ".tex"
+Path: "", Name: "test.file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "bar", Name: "test", Ext: ".tex"
+Path: "bar/baz", Name: "test", Ext: ".tex"
+Path: "bar/baz bob", Name: "test", Ext: ".tex"
+Path: "/", Name: "test", Ext: ".tex"
+Path: "/baz", Name: "", Ext: ""
+Path: "/bar/baz bob", Name: "test", Ext: ".tex"
+Path: "bar/baz bob", Name: "test", Ext: ".tex"
+Path: "//baz", Name: "...a.b", Ext: "."
+Path: "/", Name: "", Ext: "."
+Path: "/", Name: " ", Ext: ""
+============================================================
+============================================================
+TEST 9: File listing
============================================================
> File List <
minimal.cls
@@ -172,7 +197,7 @@ filetest-endinput.txt
.............
============================================================
============================================================
-TEST 9: File name sanitizing
+TEST 10: File name sanitizing
============================================================
> \l_tmpa_tl=foo.bar.
<recently read> }
@@ -203,7 +228,7 @@ l. ... }
l. ... }
============================================================
============================================================
-TEST 10: Getting file information
+TEST 11: Getting file information
============================================================
TRUE
TRUE
diff --git a/l3kernel/testfiles/m3file001.tlg b/l3kernel/testfiles/m3file001.tlg
index 31430f5fd..fb64a751c 100644
--- a/l3kernel/testfiles/m3file001.tlg
+++ b/l3kernel/testfiles/m3file001.tlg
@@ -156,7 +156,32 @@ Path: "/", Name: "", Ext: "."
Path: "/", Name: " ", Ext: ""
============================================================
============================================================
-TEST 8: File listing
+TEST 8: Expandable file name parsing
+============================================================
+Path: "", Name: "", Ext: ""
+Path: "", Name: "", Ext: ""
+Path: "", Name: "", Ext: "."
+Path: "/", Name: "", Ext: ""
+Path: "", Name: "test", Ext: ""
+Path: "", Name: "test", Ext: ".tex"
+Path: "", Name: "test", Ext: ".tex"
+Path: "", Name: "test.file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "bar", Name: "test", Ext: ".tex"
+Path: "bar/baz", Name: "test", Ext: ".tex"
+Path: "bar/baz bob", Name: "test", Ext: ".tex"
+Path: "/", Name: "test", Ext: ".tex"
+Path: "/baz", Name: "", Ext: ""
+Path: "/bar/baz bob", Name: "test", Ext: ".tex"
+Path: "bar/baz bob", Name: "test", Ext: ".tex"
+Path: "//baz", Name: "...a.b", Ext: "."
+Path: "/", Name: "", Ext: "."
+Path: "/", Name: " ", Ext: ""
+============================================================
+============================================================
+TEST 9: File listing
============================================================
> File List <
minimal.cls
@@ -172,7 +197,7 @@ filetest-endinput.txt
.............
============================================================
============================================================
-TEST 9: File name sanitizing
+TEST 10: File name sanitizing
============================================================
> \l_tmpa_tl=foo.bar.
<recently read> }
@@ -203,7 +228,7 @@ l. ... }
l. ... }
============================================================
============================================================
-TEST 10: Getting file information
+TEST 11: Getting file information
============================================================
TRUE
TRUE
diff --git a/l3kernel/testfiles/m3file001.uptex.tlg b/l3kernel/testfiles/m3file001.uptex.tlg
index 29a6f3ce6..009bbeef3 100644
--- a/l3kernel/testfiles/m3file001.uptex.tlg
+++ b/l3kernel/testfiles/m3file001.uptex.tlg
@@ -156,7 +156,32 @@ Path: "/", Name: "", Ext: "."
Path: "/", Name: " ", Ext: ""
============================================================
============================================================
-TEST 8: File listing
+TEST 8: Expandable file name parsing
+============================================================
+Path: "", Name: "", Ext: ""
+Path: "", Name: "", Ext: ""
+Path: "", Name: "", Ext: "."
+Path: "/", Name: "", Ext: ""
+Path: "", Name: "test", Ext: ""
+Path: "", Name: "test", Ext: ".tex"
+Path: "", Name: "test", Ext: ".tex"
+Path: "", Name: "test.file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "bar", Name: "test", Ext: ".tex"
+Path: "bar/baz", Name: "test", Ext: ".tex"
+Path: "bar/baz bob", Name: "test", Ext: ".tex"
+Path: "/", Name: "test", Ext: ".tex"
+Path: "/baz", Name: "", Ext: ""
+Path: "/bar/baz bob", Name: "test", Ext: ".tex"
+Path: "bar/baz bob", Name: "test", Ext: ".tex"
+Path: "//baz", Name: "...a.b", Ext: "."
+Path: "/", Name: "", Ext: "."
+Path: "/", Name: " ", Ext: ""
+============================================================
+============================================================
+TEST 9: File listing
============================================================
> File List <
minimal.cls
@@ -172,7 +197,7 @@ filetest-endinput.txt
.............
============================================================
============================================================
-TEST 9: File name sanitizing
+TEST 10: File name sanitizing
============================================================
> \l_tmpa_tl=foo.bar.
<recently read> }
@@ -203,7 +228,7 @@ l. ... }
l. ... }
============================================================
============================================================
-TEST 10: Getting file information
+TEST 11: Getting file information
============================================================
TRUE
TRUE
diff --git a/l3kernel/testfiles/m3file001.xetex.tlg b/l3kernel/testfiles/m3file001.xetex.tlg
index c72f78d13..fd5cd4c66 100644
--- a/l3kernel/testfiles/m3file001.xetex.tlg
+++ b/l3kernel/testfiles/m3file001.xetex.tlg
@@ -156,7 +156,32 @@ Path: "/", Name: "", Ext: "."
Path: "/", Name: " ", Ext: ""
============================================================
============================================================
-TEST 8: File listing
+TEST 8: Expandable file name parsing
+============================================================
+Path: "", Name: "", Ext: ""
+Path: "", Name: "", Ext: ""
+Path: "", Name: "", Ext: "."
+Path: "/", Name: "", Ext: ""
+Path: "", Name: "test", Ext: ""
+Path: "", Name: "test", Ext: ".tex"
+Path: "", Name: "test", Ext: ".tex"
+Path: "", Name: "test.file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "", Name: "test file", Ext: ".tex"
+Path: "bar", Name: "test", Ext: ".tex"
+Path: "bar/baz", Name: "test", Ext: ".tex"
+Path: "bar/baz bob", Name: "test", Ext: ".tex"
+Path: "/", Name: "test", Ext: ".tex"
+Path: "/baz", Name: "", Ext: ""
+Path: "/bar/baz bob", Name: "test", Ext: ".tex"
+Path: "bar/baz bob", Name: "test", Ext: ".tex"
+Path: "//baz", Name: "...a.b", Ext: "."
+Path: "/", Name: "", Ext: "."
+Path: "/", Name: " ", Ext: ""
+============================================================
+============================================================
+TEST 9: File listing
============================================================
> File List <
minimal.cls
@@ -172,7 +197,7 @@ filetest-endinput.txt
.............
============================================================
============================================================
-TEST 9: File name sanitizing
+TEST 10: File name sanitizing
============================================================
> \l_tmpa_tl=foo.bar.
<recently read> }
@@ -203,7 +228,7 @@ l. ... }
l. ... }
============================================================
============================================================
-TEST 10: Getting file information
+TEST 11: Getting file information
============================================================
TRUE
TRUE
More information about the latex3-commits
mailing list.