Skip to content

Commit

Permalink
remove duplicate key and update to new variables scope api
Browse files Browse the repository at this point in the history
  • Loading branch information
jclausen committed Jan 5, 2024
1 parent d5e6a6a commit bcb03dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/main/java/ortus/boxlang/runtime/scopes/Key.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public class Key {
public static final Key mask = Key.of( "mask" );
public static final Key dateFormat = Key.of( "dateFormat" );
public static final Key timeFormat = Key.of( "timeFormat" );
public static final Key size = Key.of( "size" );

/**
* --------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void testDirectoryListBif() {
result = directoryList( variables.testDirectory );
""",
context );
var result = variables.dereference( Key.of( "result" ), false );
var result = variables.get( Key.of( "result" ) );
assertTrue( result instanceof Array );
Array listing = ( Array ) result;
assertTrue( listing.size() == 3 );
Expand All @@ -109,7 +109,7 @@ public void testRecursiveDirectoryListBif() {
result = directoryList( variables.testDirectory, true );
""",
context );
var result = variables.dereference( Key.of( "result" ), false );
var result = variables.get( Key.of( "result" ) );
assertTrue( result instanceof Array );
Array listing = ( Array ) result;
assertTrue( listing.size() == 4 );
Expand All @@ -133,7 +133,7 @@ public void testNamesDirectoryListBif() {
result = directoryList( variables.testDirectory, false, "name" );
""",
context );
var result = variables.dereference( Key.of( "result" ), false );
var result = variables.get( Key.of( "result" ) );
assertTrue( result instanceof Array );
Array listing = ( Array ) result;
assertTrue( listing.size() == 3 );
Expand All @@ -156,7 +156,7 @@ public void testQueryDirectoryListBif() {
result = directoryList( variables.testDirectory, false, "query" );
""",
context );
var result = variables.dereference( Key.of( "result" ), false );
var result = variables.get( Key.of( "result" ) );
assertTrue( result instanceof Query );
Query listing = ( Query ) result;
assertTrue( listing.size() == 3 );
Expand Down Expand Up @@ -187,7 +187,7 @@ public void testFilterDirectoryListBif() {
result = directoryList( variables.testDirectory, true, "name", "*.txt" );
""",
context );
var result = variables.dereference( Key.of( "result" ), false );
var result = variables.get( Key.of( "result" ) );
assertTrue( result instanceof Array );
Array listing = ( Array ) result;
assertTrue( listing.size() == 2 );
Expand All @@ -209,7 +209,7 @@ public void testSortDirectoryListBif() {
result = directoryList( variables.testDirectory, true, "name", "*.txt", "name desc" );
""",
context );
var result = variables.dereference( Key.of( "result" ), false );
var result = variables.get( Key.of( "result" ) );
assertTrue( result instanceof Array );
Array listing = ( Array ) result;
assertTrue( listing.size() == 2 );
Expand All @@ -227,7 +227,7 @@ public void testTypeDirectoryListBif() {
result = directoryList( variables.testDirectory, true, "path", "*", "name", "directory" );
""",
context );
var result = variables.dereference( Key.of( "result" ), false );
var result = variables.get( Key.of( "result" ) );
assertTrue( result instanceof Array );
Array listing = ( Array ) result;
assertTrue( listing.size() == 2 );
Expand Down

0 comments on commit bcb03dc

Please sign in to comment.