From b9e759d4f273ff99675c6c1fc7fd91d791948b93 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 1 May 2023 01:36:51 +0100 Subject: [PATCH] JAL-629 real life test for --allframes --- test/jalview/bin/CommandsTest.java | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) 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", } }, + // + }; + } + } -- 1.7.10.2