[latex3-commits] [git/LaTeX3-latex3-latex3] cctab: Add l3debug entries for l3cctab (6501c8ecc)
PhelypeOleinik
tex.phelype at gmail.com
Mon Jul 13 23:17:44 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : cctab
Link : https://github.com/latex3/latex3/commit/6501c8ecc42838bd9c72943b7479a8e754a252e5
>---------------------------------------------------------------
commit 6501c8ecc42838bd9c72943b7479a8e754a252e5
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date: Mon Jul 13 18:17:44 2020 -0300
Add l3debug entries for l3cctab
>---------------------------------------------------------------
6501c8ecc42838bd9c72943b7479a8e754a252e5
l3kernel/l3debug.dtx | 6 +++
l3kernel/testfiles/m3cctab002.luatex.tlg | 70 +++++++++++++++++++++++++
l3kernel/testfiles/m3cctab002.lvt | 13 +++++
l3kernel/testfiles/m3cctab002.tlg | 88 ++++++++++++++++++++++++++++++++
4 files changed, 177 insertions(+)
diff --git a/l3kernel/l3debug.dtx b/l3kernel/l3debug.dtx
index 3aa7eb399..46044b1c1 100644
--- a/l3kernel/l3debug.dtx
+++ b/l3kernel/l3debug.dtx
@@ -865,6 +865,7 @@
\box_gset_eq:NN
\box_gset_eq_drop:NN
\box_gset_to_last:N
+ \cctab_gset:Nn
\clist_gset_eq:NN
\dim_gset_eq:NN
\dim_gzero:N
@@ -926,6 +927,7 @@
{ }
{
\bool_const:Nn
+ \cctab_const:Nn
\dim_const:Nn
\int_const:Nn
\intarray_const_from_clist:Nn
@@ -961,6 +963,10 @@
\__kernel_patch:nnn
{ \__kernel_chk_var_scope:NN g #1 }
{ }
+ { \cctab_new:N }
+ \__kernel_patch:nnn
+ { \__kernel_chk_var_scope:NN g #1 }
+ { }
{ \intarray_new:Nn }
\__kernel_patch:nnn
{ \__kernel_chk_var_scope:NN q #1 }
diff --git a/l3kernel/testfiles/m3cctab002.luatex.tlg b/l3kernel/testfiles/m3cctab002.luatex.tlg
index e8e4873b0..c08a32b52 100644
--- a/l3kernel/testfiles/m3cctab002.luatex.tlg
+++ b/l3kernel/testfiles/m3cctab002.luatex.tlg
@@ -47,3 +47,73 @@ TEST 5: Nested groups
\g__cctab_internalii_cctab=\catcodetable...
\g__cctab_internaliii_cctab=\catcodetable...
============================================================
+============================================================
+TEST 6: Wrong scoping
+============================================================
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_new_cctab'.
+\c_new_cctab=\catcodetable...
+\g_new_cctab=\catcodetable...
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_new_cctab'.
+\l_new_cctab=\catcodetable...
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_const_cctab'.
+\c_const_cctab=\catcodetable...
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Constant assignment to a global variable '\g_const_cctab'.
+\g_const_cctab=\catcodetable...
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Constant assignment to a local variable '\l_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_const_cctab'.
+\l_const_cctab=\catcodetable...
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_const_cctab'.
+============================================================
diff --git a/l3kernel/testfiles/m3cctab002.lvt b/l3kernel/testfiles/m3cctab002.lvt
index 52c562584..4785ae180 100644
--- a/l3kernel/testfiles/m3cctab002.lvt
+++ b/l3kernel/testfiles/m3cctab002.lvt
@@ -52,6 +52,19 @@
\group_end:
}
+\TEST { Wrong~scoping }
+ {
+ \cctab_new:N \c_new_cctab
+ \cctab_new:N \g_new_cctab
+ \cctab_new:N \l_new_cctab
+ \cctab_const:Nn \c_const_cctab { }
+ \cctab_const:Nn \g_const_cctab { }
+ \cctab_const:Nn \l_const_cctab { }
+ \cctab_gset:Nn \c_const_cctab { }
+ \cctab_gset:Nn \g_const_cctab { }
+ \cctab_gset:Nn \l_const_cctab { }
+ }
+
\ExplSyntaxOff
\END
diff --git a/l3kernel/testfiles/m3cctab002.tlg b/l3kernel/testfiles/m3cctab002.tlg
index 213f3399a..1a7c0aaf2 100644
--- a/l3kernel/testfiles/m3cctab002.tlg
+++ b/l3kernel/testfiles/m3cctab002.tlg
@@ -40,3 +40,91 @@ TEST 4: Nested \cctab_begin:N
TEST 5: Nested groups
============================================================
============================================================
+============================================================
+TEST 6: Wrong scoping
+============================================================
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_new_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_new_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_new_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_new_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Constant assignment to a global variable '\g_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Constant assignment to a local variable '\l_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a constant variable '\c_const_cctab'.
+! LaTeX3 Error: Inconsistent local/global assignment
+For immediate help type H <return>.
+ ...
+l. ... }
+This is a coding error.
+Global assignment to a local variable '\l_const_cctab'.
+============================================================
More information about the latex3-commits
mailing list.