Commits

Anonymous committed 710d71c

adjust tests after bb95b5f0321d

Comments (0)

Files changed (2)

tests/output/version.py

     finally:
         if os.path.exists(fn): os.remove(fn)
 
-mercurial.util.version = lambda: '1.5.1 test'
-repoman.util.version = lambda: '1.2 test'
-repoman.commands.thgversion = lambda: '1.0.1 test'
+mercurial.util.version = lambda: '1.5.1'
+repoman.util.version = lambda: '1.2+10-test'
+repoman.commands.thgversion = lambda: '1.0.1'
 
 versioninfo = '''{
 "products":
-    {"repoman":"1.2 test"},
+    {"repoman":"1.2+10-test"},
 "download_url": "http://repo.edlund.dk/install/RepoMan-1.2.exe",
 "message": "some message"
 }'''
     with open(vfn, 'w') as f:
         f.write(versioninfo)
     run('--config "repo-ui.version_url=%s" version --check' % vfn)
-    repoman.util.version = lambda: '1.0'
+    repoman.util.version = lambda: '1.0+20-old'
     run('--config "repo-ui.version_url=%s" version --check' % vfn)
 finally:
     if os.path.exists(vfn): os.remove(vfn)
 print '\nFailures'
 run('version --check')
 jsontest('empty', '{}')
-jsontest('nodownload', '{"products": {"repoman":"1.2 test"}}')
+jsontest('nodownload', '{"products": {"repoman":"1.1"}}')

tests/output/version.py.out

-RepoMan     1.2 test
-TortoiseHg  1.0.1 test
-Mercurial   1.5.1 test
-RepoMan is out of date; the newest version is 1.2 test (local version is 1.0)
+RepoMan     1.2+10-test
+TortoiseHg  1.0.1
+Mercurial   1.5.1
+RepoMan is out of date; the newest version is 1.2+10-test (local version is 1.0+20-old)
 Download the new version here: http://repo.edlund.dk/install/RepoMan-1.2.exe
 
 some message
 Failures
 version check not possible due to missing version_url in the repo-ui section
 abort: error getting version info: 'products'
-RepoMan is out of date; the newest version is 1.2 test (local version is 1.0)
+RepoMan is out of date; the newest version is 1.1 (local version is 1.0+20-old)