[latex3-commits] [git/LaTeX3-latex3-latex3] master: A test file was wrongly using local intarray variables (5a0246e)

Bruno Le Floch bruno at le-floch.fr
Sun Apr 1 21:53:25 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/5a0246ede19be5f20b5ace9c70850cea5ae780e3

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

commit 5a0246ede19be5f20b5ace9c70850cea5ae780e3
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Sun Apr 1 15:53:25 2018 -0400

    A test file was wrongly using local intarray variables


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

5a0246ede19be5f20b5ace9c70850cea5ae780e3
 l3kernel/testfiles/m3intarray001.luatex.tlg |   30 +++++------
 l3kernel/testfiles/m3intarray001.lvt        |   72 +++++++++++++--------------
 l3kernel/testfiles/m3intarray001.tlg        |   38 +++++++-------
 3 files changed, 70 insertions(+), 70 deletions(-)

diff --git a/l3kernel/testfiles/m3intarray001.luatex.tlg b/l3kernel/testfiles/m3intarray001.luatex.tlg
index 1ba194d..3fc351f 100644
--- a/l3kernel/testfiles/m3intarray001.luatex.tlg
+++ b/l3kernel/testfiles/m3intarray001.luatex.tlg
@@ -4,7 +4,7 @@ Author: Bruno Le Floch
 ============================================================
 TEST 1: Safe array operations
 ============================================================
-Defining \l_tmpa_intarray on line ...
+Defining \g_testa_intarray on line ...
 123
 -10
 -200
@@ -18,7 +18,7 @@ TEST 2: Safe array operations with errors
 !
 ! LaTeX error: "kernel/command-already-defined"
 ! 
-! Control sequence \l_tmpa_intarray already defined.
+! Control sequence \g_testa_intarray already defined.
 ! 
 ! See the LaTeX3 documentation for further information.
 ! 
@@ -28,13 +28,13 @@ l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | This is a coding error.
 | 
-| LaTeX has been asked to create a new control sequence '\l_tmpa_intarray' but
-| this name has already been used elsewhere.
+| LaTeX has been asked to create a new control sequence '\g_testa_intarray'
+| but this name has already been used elsewhere.
 | 
 | The current meaning is:
 |   select font cmr10 at 0.00014pt
 |...............................................
-Defining \l_tmpa_intarray on line ...
+Defining \g_testa_intarray on line ...
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
 ! LaTeX error: "kernel/out-of-bounds"
@@ -48,7 +48,7 @@ Defining \l_tmpa_intarray on line ...
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | An attempt was made to access or store data at position 0 of the array
-| '\l_tmpa_intarray', but this array has entries at positions from 1 to 12.
+| '\g_testa_intarray', but this array has entries at positions from 1 to 12.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
@@ -63,7 +63,7 @@ l. ...  }
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | An attempt was made to store -2000000000 at position 1 in the array
-| '\l_tmpa_intarray'. The largest allowed value -1073741823 will be used
+| '\g_testa_intarray'. The largest allowed value -1073741823 will be used
 | instead.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -79,7 +79,7 @@ l. ...  }
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | An attempt was made to access or store data at position 13 of the array
-| '\l_tmpa_intarray', but this array has entries at positions from 1 to 12.
+| '\g_testa_intarray', but this array has entries at positions from 1 to 12.
 |...............................................
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
@@ -107,9 +107,9 @@ and I'll forget about whatever was undefined.
 ============================================================
 TEST 3: Unsafe array operations with errors
 ============================================================
-Defining \l_tmpb_intarray on line ...
-! Font \l_tmpb_intarray has only 15 fontdimen parameters.
-<recently read> \l_tmpb_intarray 
+Defining \g_testb_intarray on line ...
+! Font \g_testb_intarray has only 15 fontdimen parameters.
+<recently read> \g_testb_intarray 
 l. ...  }
 To increase the number of font parameters, you must
 use \fontdimen immediately after the \font is loaded.
@@ -123,8 +123,8 @@ Continue and I'll use the largest value I can.
 l. ...  }
 I can't work with sizes bigger than about 19 feet.
 Continue and I'll use the largest value I can.
-! Font \l_tmpb_intarray has only 16 fontdimen parameters.
-<recently read> \l_tmpb_intarray 
+! Font \g_testb_intarray has only 16 fontdimen parameters.
+<recently read> \g_testb_intarray 
 l. ...  }
 To increase the number of font parameters, you must
 use \fontdimen immediately after the \font is loaded.
@@ -134,11 +134,11 @@ use \fontdimen immediately after the \font is loaded.
 123456
 0
 1234567
-Defining \l_tmpc_intarray on line ...
+Defining \g_testc_intarray on line ...
 12345678
 ============================================================
 ============================================================
 TEST 4: Any stray non-zero?
 ============================================================
-Defining \l_tmpd_intarray on line ...
+Defining \g_testd_intarray on line ...
 ============================================================
diff --git a/l3kernel/testfiles/m3intarray001.lvt b/l3kernel/testfiles/m3intarray001.lvt
index a21c6a8..1600d0c 100644
--- a/l3kernel/testfiles/m3intarray001.lvt
+++ b/l3kernel/testfiles/m3intarray001.lvt
@@ -1,5 +1,5 @@
 %
-% Copyright (C) 2017 LaTeX3 Project
+% Copyright (C) 2017,2018 LaTeX3 Project
 %
 
 \documentclass{minimal}
@@ -15,63 +15,63 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \TEST { Safe~array~operations }
   {
-    \intarray_new:Nn \l_tmpa_intarray { 123 }
+    \intarray_new:Nn \g_testa_intarray { 123 }
     \group_begin:
-    \intarray_gset:Nnn \l_tmpa_intarray { 1 } { 100 }
-    \intarray_gset:Nnn \l_tmpa_intarray { 2 } { -200 }
-    \intarray_gset:Nnn \l_tmpa_intarray { 1 } { -10 }
-    \intarray_gset:Nnn \l_tmpa_intarray { 123 } { 12345 }
+    \intarray_gset:Nnn \g_testa_intarray { 1 } { 100 }
+    \intarray_gset:Nnn \g_testa_intarray { 2 } { -200 }
+    \intarray_gset:Nnn \g_testa_intarray { 1 } { -10 }
+    \intarray_gset:Nnn \g_testa_intarray { 123 } { 12345 }
     \group_end:
-    \TYPE { \intarray_count:N \l_tmpa_intarray }
-    \TYPE { \intarray_item:Nn \l_tmpa_intarray { 1 } }
-    \TYPE { \intarray_item:Nn \l_tmpa_intarray { 2 } }
-    \TYPE { \intarray_item:Nn \l_tmpa_intarray { 53 } }
-    \TYPE { \intarray_item:Nn \l_tmpa_intarray { 123 } }
+    \TYPE { \intarray_count:N \g_testa_intarray }
+    \TYPE { \intarray_item:Nn \g_testa_intarray { 1 } }
+    \TYPE { \intarray_item:Nn \g_testa_intarray { 2 } }
+    \TYPE { \intarray_item:Nn \g_testa_intarray { 53 } }
+    \TYPE { \intarray_item:Nn \g_testa_intarray { 123 } }
   }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \TEST { Safe~array~operations~with~errors }
   {
-    \intarray_new:Nn \l_tmpa_intarray { 12 }
+    \intarray_new:Nn \g_testa_intarray { 12 }
     \group_begin:
-    \intarray_gset:Nnn \l_tmpa_intarray { 0 } { 2000000000 }
-    \intarray_gset:Nnn \l_tmpa_intarray { 1 } { -2000000000 }
-    \intarray_gset:Nnn \l_tmpa_intarray { 13 } { -2000000000 }
+    \intarray_gset:Nnn \g_testa_intarray { 0 } { 2000000000 }
+    \intarray_gset:Nnn \g_testa_intarray { 1 } { -2000000000 }
+    \intarray_gset:Nnn \g_testa_intarray { 13 } { -2000000000 }
     \group_end:
-    \TYPE { \intarray_item:Nn \l_tmpa_intarray { 0 } }
-    \TYPE { \intarray_item:Nn \l_tmpa_intarray { 1 } }
-    \TYPE { \intarray_item:Nn \l_tmpa_intarray { 12 } }
-    \TYPE { \intarray_item:Nn \l_tmpa_intarray { 13 } }
+    \TYPE { \intarray_item:Nn \g_testa_intarray { 0 } }
+    \TYPE { \intarray_item:Nn \g_testa_intarray { 1 } }
+    \TYPE { \intarray_item:Nn \g_testa_intarray { 12 } }
+    \TYPE { \intarray_item:Nn \g_testa_intarray { 13 } }
   }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \TEST { Unsafe~array~operations~with~errors }
   {
-    \intarray_new:Nn \l_tmpb_intarray { 15 }
+    \intarray_new:Nn \g_testb_intarray { 15 }
     \group_begin:
-    \__kernel_intarray_gset:Nnn \l_tmpb_intarray { 0 } { 2000000000 }
-    \__kernel_intarray_gset:Nnn \l_tmpb_intarray { 1 } { -2000000000 }
-    \__kernel_intarray_gset:Nnn \l_tmpb_intarray { 16 } { 123456 }
+    \__kernel_intarray_gset:Nnn \g_testb_intarray { 0 } { 2000000000 }
+    \__kernel_intarray_gset:Nnn \g_testb_intarray { 1 } { -2000000000 }
+    \__kernel_intarray_gset:Nnn \g_testb_intarray { 16 } { 123456 }
     \group_end:
-    \TYPE { \__kernel_intarray_item:Nn \l_tmpb_intarray { 0 } }
-    \TYPE { \__kernel_intarray_item:Nn \l_tmpb_intarray { 1 } }
-    \TYPE { \__kernel_intarray_item:Nn \l_tmpb_intarray { 15 } }
-    \TYPE { \__kernel_intarray_item:Nn \l_tmpb_intarray { 16 } }
-    \TYPE { \__kernel_intarray_item:Nn \l_tmpb_intarray { 17 } }
-    \__kernel_intarray_gset:Nnn \l_tmpb_intarray { 17 } { 1234567 }
-    \TYPE { \__kernel_intarray_item:Nn \l_tmpb_intarray { 17 } }
-    \intarray_new:Nn \l_tmpc_intarray { -1 }
-    \__kernel_intarray_gset:Nnn \l_tmpb_intarray { 18 } { 12345678 }
-    \TYPE { \__kernel_intarray_item:Nn \l_tmpb_intarray { 18 } }
+    \TYPE { \__kernel_intarray_item:Nn \g_testb_intarray { 0 } }
+    \TYPE { \__kernel_intarray_item:Nn \g_testb_intarray { 1 } }
+    \TYPE { \__kernel_intarray_item:Nn \g_testb_intarray { 15 } }
+    \TYPE { \__kernel_intarray_item:Nn \g_testb_intarray { 16 } }
+    \TYPE { \__kernel_intarray_item:Nn \g_testb_intarray { 17 } }
+    \__kernel_intarray_gset:Nnn \g_testb_intarray { 17 } { 1234567 }
+    \TYPE { \__kernel_intarray_item:Nn \g_testb_intarray { 17 } }
+    \intarray_new:Nn \g_testc_intarray { -1 }
+    \__kernel_intarray_gset:Nnn \g_testb_intarray { 18 } { 12345678 }
+    \TYPE { \__kernel_intarray_item:Nn \g_testb_intarray { 18 } }
   }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \int_gadd:Nn \g__intarray_font_int { 100000 } % to make sure nothing is suppressed accidentally by scaling the font.
 \TEST { Any~stray~non-zero? }
   {
-    \intarray_new:Nn \l_tmpd_intarray { 25 }
-    \int_step_inline:nnnn { 1 } { 1 } { \intarray_count:N \l_tmpd_intarray }
-      { \int_compare:nNnF { \intarray_item:Nn \l_tmpd_intarray {#1} } = 0 { \TYPE {#1} } }
+    \intarray_new:Nn \g_testd_intarray { 25 }
+    \int_step_inline:nnnn { 1 } { 1 } { \intarray_count:N \g_testd_intarray }
+      { \int_compare:nNnF { \intarray_item:Nn \g_testd_intarray {#1} } = 0 { \TYPE {#1} } }
   }
 
 \END
diff --git a/l3kernel/testfiles/m3intarray001.tlg b/l3kernel/testfiles/m3intarray001.tlg
index dda63be..7a969ce 100644
--- a/l3kernel/testfiles/m3intarray001.tlg
+++ b/l3kernel/testfiles/m3intarray001.tlg
@@ -4,7 +4,7 @@ Author: Bruno Le Floch
 ============================================================
 TEST 1: Safe array operations
 ============================================================
-Defining \l_tmpa_intarray on line ...
+Defining \g_testa_intarray on line ...
 123
 -10
 -200
@@ -18,7 +18,7 @@ TEST 2: Safe array operations with errors
 !
 ! LaTeX error: "kernel/command-already-defined"
 ! 
-! Control sequence \l_tmpa_intarray already defined.
+! Control sequence \g_testa_intarray already defined.
 ! 
 ! See the LaTeX3 documentation for further information.
 ! 
@@ -28,13 +28,13 @@ l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | This is a coding error.
 | 
-| LaTeX has been asked to create a new control sequence '\l_tmpa_intarray' but
-| this name has already been used elsewhere.
+| LaTeX has been asked to create a new control sequence '\g_testa_intarray'
+| but this name has already been used elsewhere.
 | 
 | The current meaning is:
 |   select font cmr10 at 0.00014pt
 |...............................................
-Defining \l_tmpa_intarray on line ...
+Defining \g_testa_intarray on line ...
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
 ! LaTeX error: "kernel/out-of-bounds"
@@ -48,7 +48,7 @@ Defining \l_tmpa_intarray on line ...
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | An attempt was made to access or store data at position 0 of the array
-| '\l_tmpa_intarray', but this array has entries at positions from 1 to 12.
+| '\g_testa_intarray', but this array has entries at positions from 1 to 12.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !
@@ -63,7 +63,7 @@ l. ...  }
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | An attempt was made to store -2000000000 at position 1 in the array
-| '\l_tmpa_intarray'. The largest allowed value -1073741823 will be used
+| '\g_testa_intarray'. The largest allowed value -1073741823 will be used
 | instead.
 |...............................................
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -79,7 +79,7 @@ l. ...  }
 l. ...  }
 |'''''''''''''''''''''''''''''''''''''''''''''''
 | An attempt was made to access or store data at position 13 of the array
-| '\l_tmpa_intarray', but this array has entries at positions from 1 to 12.
+| '\g_testa_intarray', but this array has entries at positions from 1 to 12.
 |...............................................
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
@@ -107,9 +107,9 @@ and I'll forget about whatever was undefined.
 ============================================================
 TEST 3: Unsafe array operations with errors
 ============================================================
-Defining \l_tmpb_intarray on line ...
-! Font \l_tmpb_intarray has only 15 fontdimen parameters.
-<recently read> \l_tmpb_intarray 
+Defining \g_testb_intarray on line ...
+! Font \g_testb_intarray has only 15 fontdimen parameters.
+<recently read> \g_testb_intarray 
 l. ...  }
 To increase the number of font parameters, you must
 use \fontdimen immediately after the \font is loaded.
@@ -123,8 +123,8 @@ Continue and I'll use the largest value I can.
 l. ...  }
 I can't work with sizes bigger than about 19 feet.
 Continue and I'll use the largest value I can.
-! Font \l_tmpb_intarray has only 16 fontdimen parameters.
-<recently read> \l_tmpb_intarray 
+! Font \g_testb_intarray has only 16 fontdimen parameters.
+<recently read> \g_testb_intarray 
 l. ...  }
 To increase the number of font parameters, you must
 use \fontdimen immediately after the \font is loaded.
@@ -134,14 +134,14 @@ use \fontdimen immediately after the \font is loaded.
 123456
 0
 1234567
-Defining \l_tmpc_intarray on line ...
-! Font \l_tmpb_intarray has only 17 fontdimen parameters.
-<recently read> \l_tmpb_intarray 
+Defining \g_testc_intarray on line ...
+! Font \g_testb_intarray has only 17 fontdimen parameters.
+<recently read> \g_testb_intarray 
 l. ...  }
 To increase the number of font parameters, you must
 use \fontdimen immediately after the \font is loaded.
-! Font \l_tmpb_intarray has only 17 fontdimen parameters.
-<recently read> \l_tmpb_intarray 
+! Font \g_testb_intarray has only 17 fontdimen parameters.
+<recently read> \g_testb_intarray 
 l. ...  }
 To increase the number of font parameters, you must
 use \fontdimen immediately after the \font is loaded.
@@ -150,5 +150,5 @@ use \fontdimen immediately after the \font is loaded.
 ============================================================
 TEST 4: Any stray non-zero?
 ============================================================
-Defining \l_tmpd_intarray on line ...
+Defining \g_testd_intarray on line ...
 ============================================================





More information about the latex3-commits mailing list