summaryrefslogtreecommitdiff
path: root/src/or/test.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-29 23:04:26 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-29 23:04:26 +0000
commit6507be4290a65c0ad7bbd614325e0b6f97c2446f (patch)
tree5a7fd64cc583ec8fa84bad757f252582c715355b /src/or/test.c
parentf910dc73d3a67ef559de0febb027a2df73eeaca4 (diff)
downloadtor-6507be4290a65c0ad7bbd614325e0b6f97c2446f.tar.gz
tor-6507be4290a65c0ad7bbd614325e0b6f97c2446f.zip
Implement new version format for post 0.1.
svn:r3022
Diffstat (limited to 'src/or/test.c')
-rw-r--r--src/or/test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/or/test.c b/src/or/test.c
index e1e89c75b6..557c80f878 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -1157,6 +1157,22 @@ test_dir_format(void)
test_eq(VER_RELEASE, ver1.status);
test_eq(999, ver1.patchlevel);
test_eq(IS_NOT_CVS, ver1.cvs);
+ test_eq(0, tor_version_parse("0.1.2.4-alpha", &ver1));
+ test_eq(0, ver1.major);
+ test_eq(1, ver1.minor);
+ test_eq(2, ver1.micro);
+ test_eq(4, ver1.patchlevel);
+ test_eq(VER_RELEASE, ver1.status);
+ test_eq(IS_NOT_CVS, ver1.cvs);
+ test_streq("alpha", ver1.status_tag);
+ test_eq(0, tor_version_parse("0.1.2.4", &ver1));
+ test_eq(0, ver1.major);
+ test_eq(1, ver1.minor);
+ test_eq(2, ver1.micro);
+ test_eq(4, ver1.patchlevel);
+ test_eq(VER_RELEASE, ver1.status);
+ test_eq(IS_NOT_CVS, ver1.cvs);
+ test_streq("", ver1.status_tag);
/* make sure is_obsolete_version() works */
test_eq(1, is_obsolete_version("0.0.1", "Tor 0.0.2"));