From f195acd89059e3b94c4d764512d31d58d1fef488 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 15 Nov 2024 21:55:23 -0500 Subject: [PATCH] groovy --- src/it/symlink-dont-follow/verify.groovy | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/it/symlink-dont-follow/verify.groovy b/src/it/symlink-dont-follow/verify.groovy index d8e4c7a..dae47c9 100644 --- a/src/it/symlink-dont-follow/verify.groovy +++ b/src/it/symlink-dont-follow/verify.groovy @@ -18,43 +18,40 @@ */ import java.io.*; -import java.util.*; -import java.util.jar.*; -import java.util.regex.*; -String[] expected = { +def expected = [ "ext", "ext/file.txt", "ext/dir/file.txt", -}; +]; for ( String path : expected ) { File file = new File( basedir, path ); - System.out.println( "Checking for existence of " + file ); + println "Checking for existence of " + file; if ( !file.exists() ) { - System.out.println( "FAILURE!" ); + println "FAILURE!"; return false; } } -String[] unexpected = { +def unexpected = [ "target/link.txt", "target/link", "target", "target2/link.txt", "target2/link", "target2", -}; +]; for ( String path : unexpected ) { File file = new File( basedir, path ); - System.out.println( "Checking for absence of " + file ); + println "Checking for absence of " + file; if ( file.exists() ) { - System.out.println( "FAILURE!" ); + println "FAILURE!"; return false; } }