Search in sources :

Example 21 with Version

use of org.fagu.version.Version in project fmv by f-agu.

the class FFInfoTestCase method testGetVersion_OK.

/**
 * @throws Exception
 */
@Test
public void testGetVersion_OK() throws Exception {
    String line = "1.0";
    assertEquals(new Version(1), FFSoftProvider.getVersion(line));
}
Also used : Version(org.fagu.version.Version) Test(org.junit.Test)

Example 22 with Version

use of org.fagu.version.Version in project fmv by f-agu.

the class FFInfoTestCase method testFFMPEGFull_N2210.

/**
 * Sur estprod03 en mars 2015
 *
 * @throws Exception
 */
@Test
public void testFFMPEGFull_N2210() throws Exception {
    Parser parser = newParserFFMpeg();
    parser.readLine("ffmpeg version n2.2.10-2-g418e9a6");
    parser.readLine("built on Nov 14 2014 14:59:05 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)");
    parser.readLine("configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libvo-aacenc --enable-libxvid --disable-ffplay --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --arch=x86_64");
    parser.readLine("libavutil      52. 66.100 / 52. 66.100");
    parser.readLine("libavcodec     55. 52.102 / 55. 52.102");
    parser.readLine("libavformat    55. 33.100 / 55. 33.100");
    parser.readLine("libavdevice    55. 10.100 / 55. 10.100");
    parser.readLine("libavfilter     4.  2.100 /  4.  2.100");
    parser.readLine("libswscale      2.  5.102 /  2.  5.102");
    parser.readLine("libswresample   0. 18.100 /  0. 18.100");
    parser.readLine("libpostproc    52.  3.100 / 52.  3.100");
    Calendar calendar = Calendar.getInstance();
    calendar.set(2014, Calendar.NOVEMBER, 14, 14, 59, 05);
    assertFull(parser, new Version(2, 2, 10, 2), calendar.getTime(), null);
}
Also used : Version(org.fagu.version.Version) Calendar(java.util.Calendar) Parser(org.fagu.fmv.soft.find.ExecSoftFoundFactory.Parser) Test(org.junit.Test)

Example 23 with Version

use of org.fagu.version.Version in project fmv by f-agu.

the class IMInfoTestCase method testParseOnMac.

/**
 * @throws IOException
 */
@Test
public void testParseOnMac() throws IOException {
    Parser parser = newParser();
    parser.readLine("Version: ImageMagick 6.9.3-7 Q16 x86_64 2016-03-27 http://www.imagemagick.org");
    parser.readLine("Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC");
    parser.readLine("License: http://www.imagemagick.org/script/license.php");
    parser.readLine("Features: Cipher DPC Modules ");
    parser.readLine("Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib");
    assertInfo(parser, new Version(6, 9, 3, 7), d(2016, 3, 27), "6.9.3.7");
}
Also used : Version(org.fagu.version.Version) Parser(org.fagu.fmv.soft.find.ExecSoftFoundFactory.Parser) Test(org.junit.Test)

Example 24 with Version

use of org.fagu.version.Version in project fmv by f-agu.

the class IMInfoTestCase method testParse_firstLines.

/**
 * @throws IOException
 */
@Test
public void testParse_firstLines() throws IOException {
    assertInfo("Version: ImageMagick 6.6.0-4 2012-05-02 Q16 http://www.imagemagick.org", new Version(6, 6, 0, 4), d(2012, 5, 2), "6.6.0.4");
    assertInfo("Version: ImageMagick 6.7.9-10 2012-10-08 Q16 http://www.imagemagick.org", new Version(6, 7, 9, 10), d(2012, 10, 8), "6.7.9.10");
    assertInfo("Version: ImageMagick 6.8.7-1 2013-10-17 Q16 http://www.imagemagick.org", new Version(6, 8, 7, 1), d(2013, 10, 17), "6.8.7.1");
    assertInfo("Version: ImageMagick 6.9.2-0 Q16 x86_64 2015-09-10 http://www.imagemagick.org", new Version(6, 9, 2, 0), d(2015, 9, 10), "6.9.2.0");
    assertInfo("Version: ImageMagick 6.9.2-1 Q16 x86_64 2015-09-18 http://www.imagemagick.org", new Version(6, 9, 2, 1), d(2015, 9, 18), "6.9.2.1");
}
Also used : Version(org.fagu.version.Version) Test(org.junit.Test)

Aggregations

Version (org.fagu.version.Version)24 Test (org.junit.Test)16 Parser (org.fagu.fmv.soft.find.ExecSoftFoundFactory.Parser)15 Date (java.util.Date)3 SoftFound (org.fagu.fmv.soft.find.SoftFound)3 ArrayList (java.util.ArrayList)2 Matcher (java.util.regex.Matcher)2 SoftExecutor (org.fagu.fmv.soft.SoftExecutor)2 SoftInfo (org.fagu.fmv.soft.find.SoftInfo)2 SoftPolicy (org.fagu.fmv.soft.find.SoftPolicy)2 VersionSoftPolicy (org.fagu.fmv.soft.find.policy.VersionSoftPolicy)2 VersionSoftPolicy.minVersion (org.fagu.fmv.soft.find.policy.VersionSoftPolicy.minVersion)2 File (java.io.File)1 IOException (java.io.IOException)1 StandardCharsets (java.nio.charset.StandardCharsets)1 LocalDate (java.time.LocalDate)1 Arrays (java.util.Arrays)1 Calendar (java.util.Calendar)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1