From: Ben Soares Date: Mon, 1 May 2023 00:36:51 +0000 (+0100) Subject: JAL-629 real life test for --allframes X-Git-Tag: Release_2_11_4_0~353 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b9e759d4f273ff99675c6c1fc7fd91d791948b93;p=jalview.git JAL-629 real life test for --allframes --- diff --git a/test/jalview/bin/CommandsTest.java b/test/jalview/bin/CommandsTest.java index 2d3724b..57c4d0d 100644 --- a/test/jalview/bin/CommandsTest.java +++ b/test/jalview/bin/CommandsTest.java @@ -14,6 +14,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import jalview.bin.argparser.Arg; import jalview.gui.AlignFrame; import jalview.gui.Desktop; import jalview.gui.JvOptionPane; @@ -219,4 +220,40 @@ public class CommandsTest } } + @Test(groups = "Functional", dataProvider = "allLinkedIdsData") + public void allLinkedIdsTest(String cmdLine, Arg a, String[] filenames) + { + String[] args = cmdLine.split("\\s+"); + Jalview.main(args); + Commands cmds = Jalview.getInstance().getCommands(); + Assert.assertNotNull(cmds); + for (String filename : filenames) + { + Assert.assertTrue(new File(filename).exists(), + "File '" + filename + "' was not created"); + } + cleanupFiles(filenames); + } + + @DataProvider(name = "allLinkedIdsData") + public Object[][] allLinkedIdsData() + { + return new Object[][] { + // + /* + { "--open=test/jalview/bin/argparser/testfiles/*.fa --substitutions --allframes --output={dirname}/{basename}.stk --close", + Arg.OUTPUT, new String[] + { "test/jalview/bin/argparser/testfiles/test1.stk", + "test/jalview/bin/argparser/testfiles/test2.stk", + "test/jalview/bin/argparser/testfiles/test3.stk", } }, + */ + { "--open=test/jalview/bin/argparser/testfiles/*.fa --substitutions --allframes --image={dirname}/{basename}.png --close", + Arg.IMAGE, new String[] + { "test/jalview/bin/argparser/testfiles/test1.png", + "test/jalview/bin/argparser/testfiles/test2.png", + "test/jalview/bin/argparser/testfiles/test3.png", } }, + // + }; + } + }