@@ -0,0 +1,1661 @@
+package lux.functions;%0A%0Aimport static org.junit.Assert.*;%0Aimport lux.Evaluator;%0Aimport lux.IndexTestSupport;%0Aimport lux.XdmResultSet;%0A%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0A/**%0A * Test the implementation of lux:search() as a URI %22resolved%22 by fn:collection()%0A */%0Apublic class FileTest %7B%0A    %0A    private static IndexTestSupport indexTestSupport;%0A    private static Evaluator eval;%0A    %0A    @BeforeClass%0A    public static void setup() throws Exception %7B%0A        indexTestSupport = new IndexTestSupport(%22lux/reader-test.xml%22);%0A        eval = indexTestSupport.makeEvaluator();%0A    %7D%0A    %0A    @Test%0A    public void testIsDir() throws Exception %7B%0A    %09XdmResultSet result = eval.evaluate (%22declare namespace file='http://expath.org/ns/file';%22 +%0A    %09%09%09%22(file:is-dir('.'), file:is-dir('xxx'), file:is-dir('./src/test/resources/conf/schema.xml'))%22);%0A    %09assertEquals (%22true false false%22, result.getXdmValue().getUnderlyingValue().getStringValue());%0A    %7D%0A%0A    @Test%0A    public void testExists() throws Exception %7B%0A    %09XdmResultSet result = eval.evaluate (%22declare namespace file='http://expath.org/ns/file';%22 +%0A    %09%09%09%22(file:exists('.'), file:exists('xxx'), file:exists('./src/test/resources/conf/schema.xml'))%22);%0A    %09assertEquals (%22true false true%22, result.getXdmValue().getUnderlyingValue().getStringValue());%0A    %7D%0A%0A    @Test%0A    public void testListFiles() throws Exception %7B%0A    %09XdmResultSet result = eval.evaluate (%22declare namespace file='http://expath.org/ns/file';%22 +%0A    %09%09%09%22(file:list('./src/test/resources/conf'))%22);%0A    %09assertEquals (%22schema.xml solrconfig.xml%22, result.getXdmValue().getUnderlyingValue().getStringValue());%0A    %7D%0A%0A%0A%7D%0A

test file extension functions