Repository: z390development/z390
Pull request #637: Re-establish tests in demo directory
Author: login: abekornelis
Labels: name: bug
description: Something isn't working
name: Lang:Script
name: component-tests
description: Related to regression test sets for z390
Created: 2025-05-18T15:08:59Z | Merged: 2025-05-31T09:44:26Z

Fixes #636 
Fixes #643 

Linked issue #636: Re-establish regression test in demo directory
In the demo directory a series of programs exist that were intended as demo/test programs.
They should be part of the regression test suite, but currently only 4 of them are used.
Also, DEMOWTO1 is a duplicate of the HELLO program and should be deleted.

Diff:
diff --git a/bash/runasmdemos b/bash/runasmdemos
index 78c901c63..474097bc5 100755
--- a/bash/runasmdemos
+++ b/bash/runasmdemos
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# runasmdemos: run HELLO, DEMOM8Q1, TESTDCB1
+# runasmdemos: run HELLO, DEMOM8Q1
 
 set -e              # exit on all errors
 cd $(dirname $0)    # set to directory of script
@@ -12,6 +12,20 @@ echo "Verify Hello World WTO"
 bash/asm demo/DEMOM8Q1 $1 $2 $3 $4 $5 $6 $7 $8 $9
 echo "Verify rc=0; see PRN file for 8 queens solutions"
 
+# runasmdemos: run various programs
+
+bash/asmlg demo/DEMOBMK1 nocon $1 $2 $3 $4 $5 $6 $7 $8 $9
+bash/asmlg demo/DEMOBMK2 nocon $1 $2 $3 $4 $5 $6 $7 $8 $9
+bash/asmlg demo/DEMODFP1 nocon $1 $2 $3 $4 $5 $6 $7 $8 $9
+bash/asm   demo/DEMONUM1 nocon $1 $2 $3 $4 $5 $6 $7 $8 $9
+bash/asmlg demo/DEMONUM2 nocon $1 $2 $3 $4 $5 $6 $7 $8 $9
+bash/asmlg demo/DEMOSTR1 nocon $1 $2 $3 $4 $5 $6 $7 $8 $9
+bash/asmlg demo/DEMOWTO2 nocon $1 $2 $3 $4 $5 $6 $7 $8 $9
+bash/asmlg demo/SIEVE    nocon $1 $2 $3 $4 $5 $6 $7 $8 $9
+bash/asmlg demo/STDDEVLB nocon $1 $2 $3 $4 $5 $6 $7 $8 $9
+
+# runasmdemos: run TESTDCB1
+
 export SYSUT1=demo/TESTDCB1.TF1
 export SYSUT2=demo/TESTDCB1.TF2
 export SYSOUT=demo/TESTDCB1.TF3
@@ -26,6 +40,8 @@ echo "TESTDCB1: Copy demo/TESTDCB1.TF1 to demo/TESTDCB1.TF2$x successful"
 echo "Verify demo/TESTDCB1 copied demo/TESTDCB1.TF1 to demo/TESTDCB1.TF2"
 echo "Verify demo/TESTDCB1 wrote to demo/TESTDCB1.TF3"
 
+# runasmdemos: run TESTDCB2
+
 export SYSUT1=demo/TESTDCB2.TF1
 export SYSUT2=demo/TESTDCB2.TF2
 export SYSOUT=demo/TESTDCB2.TF3
diff --git a/bat/RUNASMDEMOS.BAT b/bat/RUNASMDEMOS.BAT
index c52277449..2b09f4684 100644
--- a/bat/RUNASMDEMOS.BAT
+++ b/bat/RUNASMDEMOS.BAT
@@ -12,45 +12,56 @@ set /A z_NestLevel=%z_NestLevel%+1
 rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 
 pushd %~dps0..
-call bat\ASMLG %z_TraceMode% demo\HELLO    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\HELLO    nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK2 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMODFP1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMONUM1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMONUM2 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOSTR1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOWTO2 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\SIEVE    nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\STDDEVLB nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+
+rem when running this script using a pre-built distribution, the line endings are Linux-type causing file compares to fail
+rem we've disabled the file compares as of May 24, 2022. Issue 643 covers this case and requests a repair.
+
 set sysut1=demo\TESTDCB1.TF1
 set sysut2=demo\TESTDCB1.TF2
 set sysout=demo\TESTDCB1.TF3
 call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-::comp /M demo\TESTDCB1.TF1 demo\TESTDCB1.TF2
-::set z_ReturnCode=%ERRORLEVEL%
-::if %z_ReturnCode% GTR 0 (set z_ReturnCode=8
-::                         echo %0 ERROR: TESTDCB1 data were not copied correctly
-::                         goto return
-::
-::                         )
-:: next 4 lines added to temporarily match bash version
-:: type demo\TESTDCB1.TF2
-:: echo "Verify demo\TESTDCB1 copied demo\TESTDCB1.TF1 to demo\TESTDCB1.TF2"
-:: echo "Verify demo\TESTDCB1 wrote to demo\TESTDCB1.TF3"
+
+REM Normalize line endings for comparison (remove CRs) using only batch commands
+call findstr.exe /V /R "" demo\TESTDCB1.TF1 > "%TEMP%\dcb1_1.tmp" 2>nul
+call findstr.exe /V /R "" demo\TESTDCB1.TF2 > "%TEMP%\dcb1_2.tmp" 2>nul
+call comp.exe "%TEMP%\dcb1_1.tmp" "%TEMP%\dcb1_2.tmp" /A /M || goto error_dcb1
 
 set sysut1=demo\TESTDCB2.TF1
 set sysut2=demo\TESTDCB2.TF2
 set sysout=demo\TESTDCB2.TF3
 call bat\ASMLG %z_TraceMode% demo\TESTDCB2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-::comp /M demo\TESTDCB2.TF1 demo\TESTDCB2.TF2
-::set z_ReturnCode=%ERRORLEVEL%
-::if %z_ReturnCode% GTR 0 (set z_ReturnCode=8
-::                         echo %0 ERROR: TESTDCB2 data were not copied correctly
-::                         goto return
-::
-::                         )
-:: next 4 lines added to temporarily match bash version
-:: type demo\TESTDCB2.TF2
-:: echo "Verify demo\TESTDCB2 copied demo\TESTDCB2.TF1 to demo\TESTDCB1.TF2"
-:: echo "Verify demo\TESTDCB2 wrote to demo\TESTDCB2.TF3"
+
+REM Normalize line endings for comparison (remove CRs) using only batch commands
+call findstr.exe /V /R "" demo\TESTDCB2.TF1 > "%TEMP%\dcb2_1.tmp" 2>nul
+call findstr.exe /V /R "" demo\TESTDCB2.TF2 > "%TEMP%\dcb2_2.tmp" 2>nul
+call comp.exe "%TEMP%\dcb2_1.tmp" "%TEMP%\dcb2_2.tmp" /A /M || goto error_dcb2
+
 set z_ReturnCode=0
 goto return
 
 :error
 set z_ReturnCode=%ERRORLEVEL%
 echo %0 ERROR: Encountered RC %z_ReturnCode% - exiting
+goto return
+:error_dcb1
+set z_ReturnCode=%ERRORLEVEL%
+echo %0 ERROR: TESTDCB1 data were not copied correctly
+goto return
+:error_dcb2
+set z_ReturnCode=%ERRORLEVEL%
+echo %0 ERROR: TESTDCB2 data were not copied correctly
+goto return
 :return
 popd
 rem ----- Lvl(%z_NestLevel%)  End %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/demo/DEMOBMK1.MLC b/demo/DEMOBMK1.MLC
index 7ffba7127..19f654762 100644
--- a/demo/DEMOBMK1.MLC
+++ b/demo/DEMOBMK1.MLC
@@ -20,8 +20,8 @@
 * Date   - 09/30/05                                                 *
 *********************************************************************
 DEMOBMK1 SUBENTRY
-         WTO  'DEMO2 Z390 FIRST EMULATION BENCHMARK FOR 2,000,000 INS'
-         L    1,=A(2000000)
+         WTO  'DEMO2 Z390 FIRST EMULATION BENCHMARK FOR 100,000 INS'
+         L    1,=A(100000)
 LOOP     EQU  *
          BCT  1,LOOP
          SUBEXIT
diff --git a/demo/DEMOWTO1.MLC b/demo/DEMOWTO1.MLC
deleted file mode 100644
index 74959823c..000000000
--- a/demo/DEMOWTO1.MLC
+++ /dev/null
@@ -1,25 +0,0 @@
-*********************************************************************
-* z390 - Mainframe assembler emulator and run-time engine
-* Copyright (C) 2021 z390 Assembler LLC
-*
-* This file is part of z390.
-*
-* z390 is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-* z390 is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License 
-* along with this program; if not, see https://www.gnu.org/licenses.
-
-* Author - Don Higgins                                              *
-* Date   - 09/30/05                                                 *
-*********************************************************************
-DEMOWTO1 SUBENTRY
-         WTO   'HELLO WORLD'
-         SUBEXIT
-         END
diff --git a/z390test/src/test/groovy/org/z390/test/RunAsmDemos.groovy b/z390test/src/test/groovy/org/z390/test/RunAsmDemos.groovy
index 7aab5b7ba..4349970ee 100644
--- a/z390test/src/test/groovy/org/z390/test/RunAsmDemos.groovy
+++ b/z390test/src/test/groovy/org/z390/test/RunAsmDemos.groovy
@@ -4,7 +4,14 @@ import org.junit.jupiter.api.Test
 
 class RunAsmDemos extends z390Test {
 
-    var options = ['trace', 'noloadhigh', "SYSMAC(${basePath("mac")})"]
+    var options = [
+        'trace',
+        'nocon',
+        'noloadhigh', 
+        "SYSMAC(${basePath('mac')})",
+        "SYSCPY(${basePath('mac')})",
+        "SYSOBJ(${basePath('linklib')})"
+    ]
 
     @Test
     void test_HELLO() {
@@ -19,6 +26,60 @@ class RunAsmDemos extends z390Test {
         assert rc == 0
     }
     @Test
+    void test_DEMOBMK1() {
+        int rc = this.asmlg(basePath("demo", "DEMOBMK1"), *options, "MAXSIZE(150)")
+        this.printOutput()
+        assert rc == 0
+    }
+    @Test
+    void test_DEMOBMK2() {
+        int rc = this.asmlg(basePath("demo", "DEMOBMK2"), *options)
+        this.printOutput()
+        assert rc == 0
+    }
+    @Test
+    void test_DEMODFP1() {
+        int rc = this.asmlg(basePath("demo", "DEMODFP1"), *options)
+        this.printOutput()
+        assert rc == 0
+    }
+    @Test
+    void test_DEMONUM1() {
+        int rc = this.asm(basePath("demo", "DEMONUM1"), *options)
+        this.printOutput()
+        assert rc == 0
+    }
+    @Test
+    void test_DEMONUM2() {
+        int rc = this.asmlg(basePath("demo", "DEMONUM2"), *options)
+        this.printOutput()
+        assert rc == 0
+    }
+    @Test
+    void test_DEMOSTR1() {
+        int rc = this.asmlg(basePath("demo", "DEMOSTR1"), *options)
+        this.printOutput()
+        assert rc == 0
+    }
+    @Test
+    void test_DEMOWTO2() {
+        int rc = this.asmlg(basePath("demo", "DEMOWTO2"), *options)
+        this.printOutput()
+        assert rc == 0
+    }
+    @Test
+    void test_SIEVE() {
+        int rc = this.asmlg(basePath("demo", "SIEVE"), *options)
+        this.printOutput()
+        assert rc == 0
+    }
+    @Test
+    void test_STDDEVLB() {
+        int rc = this.asmlg(basePath("demo", "STDDEVLB"), *options)
+        this.printOutput()
+        assert rc == 0
+    }
+    @Test
     void test_TESTDCB1() {
         // Set input files
         env.put('SYSUT1', basePath('demo', 'TESTDCB1.TF1'))
@@ -54,5 +115,4 @@ class RunAsmDemos extends z390Test {
         assert fileData.get('TF1') == fileData.get('TF2')
         assert rc == 0
     }
-
 }


Reviews:
user: login: jyganci
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T19:25:21Z
user: login: jyganci
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T19:26:05Z
user: login: jyganci
body: Looks okay. Made a couple  of comments.I'll let Anthony approve.
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T19:30:34Z
user: login: abekornelis
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-20T03:42:19Z
user: login: abekornelis
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-20T03:42:37Z
user: login: adelosa
body: Besides the test failing on GitHub don't have issue. For that we either fix or remove. At this point I have no idea if the test only works on your machine. Nothing special about GitHub runners so good chance won't work on others. Let me know if you want me to work out the issue. 
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-21T19:55:24Z
user: login: abekornelis
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-22T08:08:52Z
user: login: adelosa
body: Looks like the test is still being bypassed for GitHub. I actually know what the issue is and it will impact all users of the distribution (I.e not cloning the repo). The distribution is built on Linux which means that the file you compare will have Linux file endings. The one generated will have Windows file endings. Hence the failure. You need to work out how to compare ignoring line endings. There may be some comp options you can use for this.
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-22T19:00:56Z
user: login: jyganci
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-28T11:49:24Z
user: login: abekornelis
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-28T13:16:53Z
user: login: adelosa
body: I pushed an update to the branch that reinstated the file compare on Windows. It strips the line endings using findstr before the compare. If you are happy with the update, then happy for you to merge.
state: DISMISSED
author_association: COLLABORATOR
submitted_at: 2025-05-29T11:21:06Z
user: login: jyganci
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-29T13:52:34Z
user: login: abekornelis
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-30T12:09:09Z
user: login: adelosa
body: Looks good to me
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-30T23:17:14Z
user: login: jyganci
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-30T23:25:00Z

Review comments:
diff_hunk: @@ -11,46 +11,53 @@ if /I "%1" == "tron" (set z_TraceMode=tron
 set /A z_NestLevel=%z_NestLevel%+1
 rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 
+rem during build on github server the compare steps fail - no clue why.
+rem parm *Nocompare was introduced to enable us to suppress the compare steps during build
+rem but keep the default to do run the compare steps when the RUNASMDEMOS is invoked without the parm
+if /I %1. == *Nocompare. (set compflag=N
+                          shift /1
+                  ) else (set compflag=Y)
+
 pushd %~dps0..
 call bat\ASMLG %z_TraceMode% demo\HELLO    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
 call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMODFP1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMONUM1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMONUM2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOSTR1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOWTO2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\SIEVE    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\STDDEVLB %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+
 set sysut1=demo\TESTDCB1.TF1
 set sysut2=demo\TESTDCB1.TF2
 set sysout=demo\TESTDCB1.TF3
-call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-::comp /M demo\TESTDCB1.TF1 demo\TESTDCB1.TF2
-::set z_ReturnCode=%ERRORLEVEL%
-::if %z_ReturnCode% GTR 0 (set z_ReturnCode=8
-::                         echo %0 ERROR: TESTDCB1 data were not copied correctly
-::                         goto return
-::
-::                         )
-:: next 4 lines added to temporarily match bash version
-:: type demo\TESTDCB1.TF2
-:: echo "Verify demo\TESTDCB1 copied demo\TESTDCB1.TF1 to demo\TESTDCB1.TF2"
-:: echo "Verify demo\TESTDCB1 wrote to demo\TESTDCB1.TF3"
+                      call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
path: bat/RUNASMDEMOS.BAT
user: login: jyganci
body: Line appears to be indented???
created_at: 2025-05-19T19:25:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -11,46 +11,53 @@ if /I "%1" == "tron" (set z_TraceMode=tron
 set /A z_NestLevel=%z_NestLevel%+1
 rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 
+rem during build on github server the compare steps fail - no clue why.
+rem parm *Nocompare was introduced to enable us to suppress the compare steps during build
+rem but keep the default to do run the compare steps when the RUNASMDEMOS is invoked without the parm
+if /I %1. == *Nocompare. (set compflag=N
+                          shift /1
+                  ) else (set compflag=Y)
+
 pushd %~dps0..
 call bat\ASMLG %z_TraceMode% demo\HELLO    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
 call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMODFP1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMONUM1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMONUM2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOSTR1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOWTO2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\SIEVE    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\STDDEVLB %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+
 set sysut1=demo\TESTDCB1.TF1
 set sysut2=demo\TESTDCB1.TF2
 set sysout=demo\TESTDCB1.TF3
-call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-::comp /M demo\TESTDCB1.TF1 demo\TESTDCB1.TF2
-::set z_ReturnCode=%ERRORLEVEL%
-::if %z_ReturnCode% GTR 0 (set z_ReturnCode=8
-::                         echo %0 ERROR: TESTDCB1 data were not copied correctly
-::                         goto return
-::
-::                         )
-:: next 4 lines added to temporarily match bash version
-:: type demo\TESTDCB1.TF2
-:: echo "Verify demo\TESTDCB1 copied demo\TESTDCB1.TF1 to demo\TESTDCB1.TF2"
-:: echo "Verify demo\TESTDCB1 wrote to demo\TESTDCB1.TF3"
+                      call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+if /I %compflag% == Y call comp.exe demo\TESTDCB1.TF1 demo\TESTDCB1.TF2 /A /M               || goto error_dcb1
 
 set sysut1=demo\TESTDCB2.TF1
 set sysut2=demo\TESTDCB2.TF2
 set sysout=demo\TESTDCB2.TF3
-call bat\ASMLG %z_TraceMode% demo\TESTDCB2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-::comp /M demo\TESTDCB2.TF1 demo\TESTDCB2.TF2
-::set z_ReturnCode=%ERRORLEVEL%
-::if %z_ReturnCode% GTR 0 (set z_ReturnCode=8
-::                         echo %0 ERROR: TESTDCB2 data were not copied correctly
-::                         goto return
-::
-::                         )
-:: next 4 lines added to temporarily match bash version
-:: type demo\TESTDCB2.TF2
-:: echo "Verify demo\TESTDCB2 copied demo\TESTDCB2.TF1 to demo\TESTDCB1.TF2"
-:: echo "Verify demo\TESTDCB2 wrote to demo\TESTDCB2.TF3"
+                      call bat\ASMLG %z_TraceMode% demo\TESTDCB2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
path: bat/RUNASMDEMOS.BAT
user: login: jyganci
body: Line appears to be indented???
created_at: 2025-05-19T19:26:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -11,46 +11,53 @@ if /I "%1" == "tron" (set z_TraceMode=tron
 set /A z_NestLevel=%z_NestLevel%+1
 rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 
+rem during build on github server the compare steps fail - no clue why.
+rem parm *Nocompare was introduced to enable us to suppress the compare steps during build
+rem but keep the default to do run the compare steps when the RUNASMDEMOS is invoked without the parm
+if /I %1. == *Nocompare. (set compflag=N
+                          shift /1
+                  ) else (set compflag=Y)
+
 pushd %~dps0..
 call bat\ASMLG %z_TraceMode% demo\HELLO    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
 call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMODFP1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMONUM1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMONUM2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOSTR1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOWTO2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\SIEVE    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\STDDEVLB %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+
 set sysut1=demo\TESTDCB1.TF1
 set sysut2=demo\TESTDCB1.TF2
 set sysout=demo\TESTDCB1.TF3
-call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-::comp /M demo\TESTDCB1.TF1 demo\TESTDCB1.TF2
-::set z_ReturnCode=%ERRORLEVEL%
-::if %z_ReturnCode% GTR 0 (set z_ReturnCode=8
-::                         echo %0 ERROR: TESTDCB1 data were not copied correctly
-::                         goto return
-::
-::                         )
-:: next 4 lines added to temporarily match bash version
-:: type demo\TESTDCB1.TF2
-:: echo "Verify demo\TESTDCB1 copied demo\TESTDCB1.TF1 to demo\TESTDCB1.TF2"
-:: echo "Verify demo\TESTDCB1 wrote to demo\TESTDCB1.TF3"
+                      call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
path: bat/RUNASMDEMOS.BAT
user: login: abekornelis
body: I aligned with the call statement on the next line - they belong together as a pair.
created_at: 2025-05-20T03:42:19Z
author_association: COLLABORATOR
diff_hunk: @@ -11,46 +11,53 @@ if /I "%1" == "tron" (set z_TraceMode=tron
 set /A z_NestLevel=%z_NestLevel%+1
 rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 
+rem during build on github server the compare steps fail - no clue why.
+rem parm *Nocompare was introduced to enable us to suppress the compare steps during build
+rem but keep the default to do run the compare steps when the RUNASMDEMOS is invoked without the parm
+if /I %1. == *Nocompare. (set compflag=N
+                          shift /1
+                  ) else (set compflag=Y)
+
 pushd %~dps0..
 call bat\ASMLG %z_TraceMode% demo\HELLO    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
 call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMODFP1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMONUM1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMONUM2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOSTR1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOWTO2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\SIEVE    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\STDDEVLB %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+
 set sysut1=demo\TESTDCB1.TF1
 set sysut2=demo\TESTDCB1.TF2
 set sysout=demo\TESTDCB1.TF3
-call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-::comp /M demo\TESTDCB1.TF1 demo\TESTDCB1.TF2
-::set z_ReturnCode=%ERRORLEVEL%
-::if %z_ReturnCode% GTR 0 (set z_ReturnCode=8
-::                         echo %0 ERROR: TESTDCB1 data were not copied correctly
-::                         goto return
-::
-::                         )
-:: next 4 lines added to temporarily match bash version
-:: type demo\TESTDCB1.TF2
-:: echo "Verify demo\TESTDCB1 copied demo\TESTDCB1.TF1 to demo\TESTDCB1.TF2"
-:: echo "Verify demo\TESTDCB1 wrote to demo\TESTDCB1.TF3"
+                      call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+if /I %compflag% == Y call comp.exe demo\TESTDCB1.TF1 demo\TESTDCB1.TF2 /A /M               || goto error_dcb1
 
 set sysut1=demo\TESTDCB2.TF1
 set sysut2=demo\TESTDCB2.TF2
 set sysout=demo\TESTDCB2.TF3
-call bat\ASMLG %z_TraceMode% demo\TESTDCB2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-::comp /M demo\TESTDCB2.TF1 demo\TESTDCB2.TF2
-::set z_ReturnCode=%ERRORLEVEL%
-::if %z_ReturnCode% GTR 0 (set z_ReturnCode=8
-::                         echo %0 ERROR: TESTDCB2 data were not copied correctly
-::                         goto return
-::
-::                         )
-:: next 4 lines added to temporarily match bash version
-:: type demo\TESTDCB2.TF2
-:: echo "Verify demo\TESTDCB2 copied demo\TESTDCB2.TF1 to demo\TESTDCB1.TF2"
-:: echo "Verify demo\TESTDCB2 wrote to demo\TESTDCB2.TF3"
+                      call bat\ASMLG %z_TraceMode% demo\TESTDCB2 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
path: bat/RUNASMDEMOS.BAT
user: login: abekornelis
body: As above, I aligned with the call statement on the next line - they belong together as a pair.
created_at: 2025-05-20T03:42:37Z
author_association: COLLABORATOR
diff_hunk: @@ -11,46 +11,53 @@ if /I "%1" == "tron" (set z_TraceMode=tron
 set /A z_NestLevel=%z_NestLevel%+1
 rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 
+rem during build on github server the compare steps fail - no clue why.
path: bat/RUNASMDEMOS.BAT
user: login: adelosa
body: Do you want me to investigate reason for fail when running on GitHub? 
created_at: 2025-05-21T19:50:17Z
author_association: COLLABORATOR
diff_hunk: @@ -11,46 +11,53 @@ if /I "%1" == "tron" (set z_TraceMode=tron
 set /A z_NestLevel=%z_NestLevel%+1
 rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 
+rem during build on github server the compare steps fail - no clue why.
path: bat/RUNASMDEMOS.BAT
user: login: abekornelis
body: With PR#635 in place, I should be able to diagnose the issue myself. Will have a look when time permits.
created_at: 2025-05-22T08:08:52Z
author_association: COLLABORATOR
diff_hunk: @@ -12,45 +12,48 @@ set /A z_NestLevel=%z_NestLevel%+1
 rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 
 pushd %~dps0..
-call bat\ASMLG %z_TraceMode% demo\HELLO    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\HELLO    nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK2 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMODFP1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMONUM1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMONUM2 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOSTR1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOWTO2 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\SIEVE    nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\STDDEVLB nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+
+rem when running this script using a pre-built distribution, the line endings are Linux-type causing file compares to fail
+rem we've disabled the file compares as of May 24, 2022. Issue 643 covers this case and requests a repair.
path: bat/RUNASMDEMOS.BAT
user: login: jyganci
body: May 24, 2022 should be May 24, 2025 ???
created_at: 2025-05-28T11:49:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -12,45 +12,48 @@ set /A z_NestLevel=%z_NestLevel%+1
 rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 
 pushd %~dps0..
-call bat\ASMLG %z_TraceMode% demo\HELLO    %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\HELLO    nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMOM8Q1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOBMK2 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMODFP1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASM   %z_TraceMode% demo\DEMONUM1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMONUM2 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOSTR1 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\DEMOWTO2 nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\SIEVE    nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+call bat\ASMLG %z_TraceMode% demo\STDDEVLB nocon %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+
+rem when running this script using a pre-built distribution, the line endings are Linux-type causing file compares to fail
+rem we've disabled the file compares as of May 24, 2022. Issue 643 covers this case and requests a repair.
path: bat/RUNASMDEMOS.BAT
user: login: abekornelis
body: No, the stated date is correct. That date PR#418 was merged which disabled the comparison steps.
created_at: 2025-05-28T13:16:53Z
author_association: COLLABORATOR
diff_hunk: @@ -30,14 +30,26 @@ rem we've disabled the file compares as of May 24, 2022. Issue 643 covers this c
 set sysut1=demo\TESTDCB1.TF1
 set sysut2=demo\TESTDCB1.TF2
 set sysout=demo\TESTDCB1.TF3
-    call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-rem call comp.exe demo\TESTDCB1.TF1 demo\TESTDCB1.TF2 /A /M               || goto error_dcb1
+call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+
+REM Normalize line endings for comparison (remove CRs) using only batch commands
+if exist "%TEMP%\dcb1_1.tmp" del "%TEMP%\dcb1_1.tmp"
+if exist "%TEMP%\dcb1_2.tmp" del "%TEMP%\dcb1_2.tmp"
+findstr /V /R "" demo\TESTDCB1.TF1 > "%TEMP%\dcb1_1.tmp" 2>nul
+findstr /V /R "" demo\TESTDCB1.TF2 > "%TEMP%\dcb1_2.tmp" 2>nul
+comp.exe "%TEMP%\dcb1_1.tmp" "%TEMP%\dcb1_2.tmp" /A /M || goto error_dcb1
path: bat/RUNASMDEMOS.BAT
user: login: jyganci
body: just a question. The original was "call comp.exe ...". You've replaced it with "comp.exe ...". Is this intended?
created_at: 2025-05-29T13:52:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -30,14 +30,26 @@ rem we've disabled the file compares as of May 24, 2022. Issue 643 covers this c
 set sysut1=demo\TESTDCB1.TF1
 set sysut2=demo\TESTDCB1.TF2
 set sysout=demo\TESTDCB1.TF3
-    call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
-rem call comp.exe demo\TESTDCB1.TF1 demo\TESTDCB1.TF2 /A /M               || goto error_dcb1
+call bat\ASMLG %z_TraceMode% demo\TESTDCB1 %1 %2 %3 %4 %5 %6 %7 %8 %9 || goto error
+
+REM Normalize line endings for comparison (remove CRs) using only batch commands
+if exist "%TEMP%\dcb1_1.tmp" del "%TEMP%\dcb1_1.tmp"
+if exist "%TEMP%\dcb1_2.tmp" del "%TEMP%\dcb1_2.tmp"
+findstr /V /R "" demo\TESTDCB1.TF1 > "%TEMP%\dcb1_1.tmp" 2>nul
+findstr /V /R "" demo\TESTDCB1.TF2 > "%TEMP%\dcb1_2.tmp" 2>nul
+comp.exe "%TEMP%\dcb1_1.tmp" "%TEMP%\dcb1_2.tmp" /A /M || goto error_dcb1
path: bat/RUNASMDEMOS.BAT
user: login: abekornelis
body: Using explicit call instead of implicit, and adding file extension, is a habit of mine that has grown from precaution. It avoids invoking the 'wrong' thing when run on a system that I cannot control. Paranoid? I guess so :-) 
I did put the call back in, and I removed the delete steps, the redirected output using a single `>` will "create-or-replace" the target file anyway. (You can use `>>' to "create-or-append" but that's not what we want in this case)
A big thank-you to Anthony for providing this solution. Nifty, but effective and straightforward. I like that!
created_at: 2025-05-30T12:09:09Z
author_association: COLLABORATOR

PR comments:
user: login: abekornelis
created_at: 2025-05-22T19:23:19Z
body: @adelosa You do have a point there. Although the comparison has been disabled for a long time, it should be re-enabled. The problem is that neither comp nor fc utility support an option to ignore line endings. So we must fall back to copying the reference file using copy or xcopy, but neither of those has an option to force a specific type of line ending. I found some tools to convert the line endings but nothing native to Windows. I am for now at a loss and do not have a solution other than writing our own comparison program. I think that kinda beats the purpose. 
author_association: COLLABORATOR
user: login: adelosa
created_at: 2025-05-22T21:41:45Z
body: I think this is returning to my point about the purpose of bat/bash vs unit tests. This test is very easy to do using groovy/java and junit. They are designed for writing tests. I don't think you can say the same about windows batch commands. 
I'm sure ai will have the answer.
author_association: COLLABORATOR