1
0
mirror of https://github.com/hustcer/deepseek-review.git synced 2026-05-13 05:16:05 +08:00

chore: Try to add tests workflow and some common tests (#125)

This commit is contained in:
hustcer
2025-02-14 23:50:46 +08:00
parent 2b2cb85fd8
commit 17ab7ae3fa
2 changed files with 80 additions and 0 deletions

20
tests/test-common.nu Normal file
View File

@@ -0,0 +1,20 @@
use std/assert
use ../nu/common.nu [compare-ver]
#[test]
def 'v1.0.0 is greater than v0.1.0' [] {
assert equal (compare-ver 1.0.0 0.1.0) 1
assert equal (compare-ver v1.0.0 v0.1.0) 1
}
#[test]
def 'v1.0.1 is equal to v1.0.1' [] {
assert equal (compare-ver 1.0.1 1.0.1) 0
}
#[test]
def 'v1.0.1 is lower than v1.1.0' [] {
assert equal (compare-ver 1.0.1 1.1.0) (-1)
}