File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/test/java/org/apposed/appose/builder Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 3737
3838import java .io .File ;
3939import java .io .IOException ;
40+ import java .net .URL ;
4041
4142import static org .junit .jupiter .api .Assertions .assertInstanceOf ;
4243import static org .junit .jupiter .api .Assertions .assertThrows ;
@@ -191,4 +192,21 @@ public void testContentPixiToml() throws Exception {
191192 assertInstanceOf (PixiBuilder .class , env .builder ());
192193 cowsayAndAssert (env , "toml!" );
193194 }
195+
196+ /** Tests building from a file:// URL to exercise URL support. */
197+ @ Test
198+ public void testURLSupport () throws Exception {
199+ // Get absolute path and convert to file:// URL
200+ File configFile = new File ("src/test/resources/envs/cowsay.yml" ).getAbsoluteFile ();
201+ URL fileURL = configFile .toURI ().toURL ();
202+
203+ Environment env = Appose
204+ .pixi (fileURL )
205+ .base ("target/envs/pixi-url-test" )
206+ .logDebug ()
207+ .build ();
208+
209+ assertInstanceOf (PixiBuilder .class , env .builder ());
210+ cowsayAndAssert (env , "url!" );
211+ }
194212}
You can’t perform that action at this time.
0 commit comments