diff options
Diffstat (limited to 'src/util/libtoolVersion-test.ts')
-rw-r--r-- | src/util/libtoolVersion-test.ts | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/util/libtoolVersion-test.ts b/src/util/libtoolVersion-test.ts index 0a610e455..e58e94759 100644 --- a/src/util/libtoolVersion-test.ts +++ b/src/util/libtoolVersion-test.ts @@ -19,12 +19,30 @@ import * as LibtoolVersion from "./libtoolVersion"; import test from "ava"; test("version comparison", (t) => { - t.deepEqual(LibtoolVersion.compare("0:0:0", "0:0:0"), {compatible: true, currentCmp: 0}); + t.deepEqual(LibtoolVersion.compare("0:0:0", "0:0:0"), { + compatible: true, + currentCmp: 0, + }); t.deepEqual(LibtoolVersion.compare("0:0:0", ""), undefined); t.deepEqual(LibtoolVersion.compare("foo", "0:0:0"), undefined); - t.deepEqual(LibtoolVersion.compare("0:0:0", "1:0:1"), {compatible: true, currentCmp: -1}); - t.deepEqual(LibtoolVersion.compare("0:0:0", "1:5:1"), {compatible: true, currentCmp: -1}); - t.deepEqual(LibtoolVersion.compare("0:0:0", "1:5:0"), {compatible: false, currentCmp: -1}); - t.deepEqual(LibtoolVersion.compare("1:0:0", "0:5:0"), {compatible: false, currentCmp: 1}); - t.deepEqual(LibtoolVersion.compare("1:0:1", "1:5:1"), {compatible: true, currentCmp: 0}); + t.deepEqual(LibtoolVersion.compare("0:0:0", "1:0:1"), { + compatible: true, + currentCmp: -1, + }); + t.deepEqual(LibtoolVersion.compare("0:0:0", "1:5:1"), { + compatible: true, + currentCmp: -1, + }); + t.deepEqual(LibtoolVersion.compare("0:0:0", "1:5:0"), { + compatible: false, + currentCmp: -1, + }); + t.deepEqual(LibtoolVersion.compare("1:0:0", "0:5:0"), { + compatible: false, + currentCmp: 1, + }); + t.deepEqual(LibtoolVersion.compare("1:0:1", "1:5:1"), { + compatible: true, + currentCmp: 0, + }); }); |