Skip to content

Commit 54d89e9

Browse files
authored
bug: boxlang prime issues (#312)
* bug: boxlang prime issues * chore: update testbox runner and index * chore: use TestBox be, to make sure date/time objects are equalized correctly. * chore: updates of old github actions
1 parent c51c08e commit 54d89e9

7 files changed

Lines changed: 61 additions & 41 deletions

File tree

.github/workflows/cron.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
experimental: true
2424
steps:
2525
- name: Checkout Repository
26-
uses: actions/checkout@v3.2.0
26+
uses: actions/checkout@v7
2727

2828
- name: Setup Java JDK
29-
uses: actions/setup-java@v3.9.0
29+
uses: actions/setup-java@v5
3030
with:
3131
distribution: 'zulu'
3232
java-version: 21

.github/workflows/pr.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
experimental: true
3232
steps:
3333
- name: Checkout Repository
34-
uses: actions/checkout@v3.2.0
34+
uses: actions/checkout@v7
3535

3636
- name: Setup Java JDK
37-
uses: actions/setup-java@v3.9.0
37+
uses: actions/setup-java@v5
3838
with:
3939
distribution: 'zulu'
4040
java-version: 21
@@ -65,10 +65,10 @@ jobs:
6565
name: Format
6666
steps:
6767
- name: Checkout Repository
68-
uses: actions/checkout@v3.2.0
68+
uses: actions/checkout@v7
6969

7070
- name: Setup Java JDK
71-
uses: actions/setup-java@v3.9.0
71+
uses: actions/setup-java@v5
7272
with:
7373
distribution: 'zulu'
7474
java-version: 11
@@ -83,6 +83,6 @@ jobs:
8383
run: box run-script format
8484

8585
- name: Commit Format Changes
86-
uses: stefanzweifel/git-auto-commit-action@v4
86+
uses: stefanzweifel/git-auto-commit-action@v7.2.0
8787
with:
8888
commit_message: Apply cfformat changes

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
fullNull: ["true", "false"]
2020
steps:
2121
- name: Checkout Repository
22-
uses: actions/checkout@v3.2.0
22+
uses: actions/checkout@v7
2323

2424
- name: Setup Java JDK
25-
uses: actions/setup-java@v3.9.0
25+
uses: actions/setup-java@v5
2626
with:
2727
distribution: 'zulu'
2828
java-version: 21
@@ -57,12 +57,12 @@ jobs:
5757
GA_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
5858
steps:
5959
- name: Checkout Repository
60-
uses: actions/checkout@v3.2.0
60+
uses: actions/checkout@v7
6161
with:
6262
fetch-depth: 0
6363

6464
- name: Setup Java JDK
65-
uses: actions/setup-java@v3.9.0
65+
uses: actions/setup-java@v5
6666
with:
6767
distribution: 'zulu'
6868
java-version: 21

models/Grammars/AutoDiscover.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ component singleton {
2626
}
2727

2828
function onMissingMethod( missingMethodName, missingMethodArguments ) {
29-
if ( !structKeyExists( variables, "grammar" ) ) {
29+
if ( isNull( variables.grammar ) || !structKeyExists( variables, "grammar" ) ) {
3030
variables.grammar = autoDiscoverGrammar();
3131
}
3232
return invoke( variables.grammar, missingMethodName, missingMethodArguments );

server-boxlang-cfml@1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"JVM":{
1616
"heapSize":"1024",
1717
"javaVersion":"openjdk21_jre",
18-
"args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888"
18+
"args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8889"
1919
},
2020
"openBrowser":"false",
2121
"env":{},

tests/index.cfm

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
cfsetting( showdebugoutput="false" );
44
// GLOBAL VARIABLES
55
ASSETS_DIR = expandPath( "/testbox/system/reports/assets" );
6-
TESTBOX_VERSION = new testBox.system.TestBox().getVersion();
6+
TESTBOX_VERSION = new testbox.system.TestBox().getVersion();
77
// TEST LOCATIONS -> UPDATE AS YOU SEE FIT
8-
rootMapping = "/tests/specs";
8+
rootMapping = "/tests";
99
1010
// Local Variables
1111
rootPath = expandPath( rootMapping );
@@ -90,20 +90,24 @@
9090
Below is a listing of the runners matching the "runner*.(cfm|bxm)" pattern.
9191
</p>
9292
93-
<cfset runners = directoryList( executePath, false, "query", "runner*.cfm|runner*.bxm" )>
94-
<cfoutput query="runners">
95-
<a
96-
href="#runners.name#"
97-
target="_blank"
98-
<cfif listLast( runners.name, "." ) eq "bxm">
99-
class="btn btn-success btn-sm my-1 mx-1"
100-
<cfelse>
101-
class="btn btn-info btn-sm my-1 mx-1"
102-
</cfif>
103-
>
104-
#runners.name#
105-
</a>
106-
</cfoutput>
93+
<cfset runners = directoryList( targetPath, false, "query", "runner*.cfm|runner*.bxm" )>
94+
<cfif runners.recordCount eq 0>
95+
<p class="alert alert-warning">No runners found in this directory</p>
96+
<cfelse>
97+
<cfloop query="runners">
98+
<a
99+
href="#runners.name#"
100+
target="_blank"
101+
<cfif listLast( runners.name, "." ) eq "bxm">
102+
class="btn btn-success btn-sm my-1 mx-1"
103+
<cfelse>
104+
class="btn btn-info btn-sm my-1 mx-1"
105+
</cfif>
106+
>
107+
#runners.name#
108+
</a>
109+
</cfloop>
110+
</cfif>
107111
</div>
108112
</div>
109113
@@ -187,4 +191,4 @@
187191
188192
</body>
189193
</html>
190-
</cfoutput>
194+
</cfoutput>

tests/runner.cfm

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
11
<cfsetting showDebugOutput="false">
22
<!--- Executes all tests in the 'specs' folder with simple reporter by default --->
3-
<cfparam name="url.reporter" default="simple">
4-
<cfparam name="url.directory" default="tests.specs">
5-
<cfparam name="url.recurse" default="true" type="boolean">
6-
<cfparam name="url.bundles" default="">
7-
<cfparam name="url.labels" default="">
8-
<cfparam name="url.reportpath" default="#expandPath( "/tests/results" )#">
3+
<cfparam name="url.reporter" default="simple">
4+
<cfparam name="url.directory" default="tests.specs">
5+
<cfparam name="url.recurse" default="true" type="boolean">
6+
<cfparam name="url.bundles" default="">
7+
<cfparam name="url.labels" default="">
8+
<cfparam name="url.excludes" default="">
9+
<cfparam name="url.reportpath" default="#expandPath( "/tests/results" )#">
910
<cfparam name="url.propertiesFilename" default="TEST.properties">
1011
<cfparam name="url.propertiesSummary" default="false" type="boolean">
12+
<cfparam name="url.editor" default="vscode">
13+
<cfparam name="url.bundlesPattern" default="*Spec*.cfc|*Test*.cfc|*Spec*.bx|*Test*.bx">
14+
15+
<!--- Streaming mode: streams results via Server-Sent Events (SSE) for real-time progress --->
16+
<cfparam name="url.streaming" default="false" type="boolean">
17+
<cfparam name="url.dryRun" default="false" type="boolean">
1118

1219
<!--- Code Coverage requires FusionReactor --->
1320
<cfparam name="url.coverageEnabled" default="false">
14-
<cfparam name="url.coveragePathToCapture" default="#expandPath( '/qb' )#">
21+
<cfparam name="url.coveragePathToCapture" default="#expandPath( '/root' )#">
1522
<cfparam name="url.coverageWhitelist" default="">
16-
<cfparam name="url.coverageBlacklist" default="/testbox,/tests,/docs,/modules">
17-
<cfparam name="url.coverageBrowserOutputDir" default="#expandPath( '/tests/results/coverageReport' )#">
23+
<cfparam name="url.coverageBlacklist" default="/testbox,/coldbox,/tests,/modules,Application.cfc,/index.cfm,Application.bx,/index.bxm">
24+
<!---<cfparam name="url.coverageBrowserOutputDir" default="#expandPath( '/tests/results/coverageReport' )#">--->
25+
<!---<cfparam name="url.coverageSonarQubeXMLOutputPath" default="#expandPath( '/tests/results/SonarQubeCoverage.xml' )#">--->
26+
<!--- Enable batched code coverage reporter, useful for large test bundles which require spreading over multiple testbox run commands. --->
27+
<!--- <cfparam name="url.isBatched" default="false"> --->
1828

19-
<!--- Include the TestBox HTML Runner --->
20-
<cfinclude template="/testbox/system/runners/HTMLRunner.cfm" >
29+
<!--- Include the appropriate runner based on streaming mode --->
30+
<cfif url.streaming && !url.dryRun>
31+
<!--- Stream results in real-time via SSE --->
32+
<cfinclude template="/testbox/system/runners/StreamingRunner.cfm">
33+
<cfelse>
34+
<!--- Traditional batch results --->
35+
<cfinclude template="/testbox/system/runners/HTMLRunner.cfm">
36+
</cfif>

0 commit comments

Comments
 (0)