aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_versions.rb
AgeCommit message (Collapse)Author
2016-11-10Version: allow coercing non-versions in comparisonsMisty De Meo
These are needed due to the raw string and fixnum comparisons which exist for legacy reasons, for instance compiler version and build comparisons.
2016-11-10Version: allow comparing against nilMisty De Meo
2016-11-10Add Version::NULL singletonMisty De Meo
2016-09-24version: don't let a/b imply alpha/beta.Mike McQuaid
This is assumption is broken for at least OpenSSL which makes it a bad general rule. As discussed in #1102.
2016-09-23test_versions: add elasticsearch alpha test caseZhiming Wang
2016-09-17rubocop --auto-correct all hash-rocket usage.Mike McQuaid
2016-08-18version: fix parsing of URLs ending with versionilovezfs
https://github.com/lihaoyi/Ammonite/releases/download/0.7.4/0.7.4 was parsing as "0.7" not "0.7.4" since ".4" was being treated as a legitimate file extension. At minimum, let's insist that a valid file extension include at least one letter to avoid lopping off part of the correct version string.
2016-08-06tests: fix code style issues (#587)Andrea Kao
2016-07-16Unify Version.create usageVlad Shablinsky
Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
2016-07-16Add HeadVersion testsVlad Shablinsky
2016-02-19version: correctly parse codeload URLsAlex Dunn
Needed for Homebrew/homebrew#49346. Closes Homebrew/homebrew#49354. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2016-02-17version: fix GitHub releases URLs parsingBaptiste Fontaine
The current code doesn't work with releases that have more than one digit in the third group, i.e.: .../releases/download/1.2.3/... works .../releases/download/1.2.34/... doesn't work Closes Homebrew/homebrew#49255. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-10tests: Add missing version testsBaptiste Fontaine
Closes Homebrew/homebrew#49031. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-04test: exhaustively test comparison of versionsMartin Afanasjew
This tests all possible combinations of alpha, beta, RC, regular, and patch versions. Also improves code coverage and partitions the version comparison tests into more uniform chunks. Closes Homebrew/homebrew#47669. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-02Improve dash separated version detection.Xiyue Deng
* Also with test case. Closes Homebrew/homebrew#47584. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-26Fix version parsing on URLs with no extensionsStefano Pigozzi
2015-10-04version: parse opam archivesBaptiste Fontaine
Closes Homebrew/homebrew#44544. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-05-04Stop testing implementationJack Nagel
2015-02-26Remove SourceForge references.Mike McQuaid
It was fun but we just love Bintray more than you. Closes Homebrew/homebrew#37211. Closes Homebrew/homebrew#37213. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-01-30Fix more version misdetections for URLs with archsBaptiste Fontaine
Closes Homebrew/homebrew#36368. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-01-28Fix version misdetections for URLs with OS/archsBaptiste Fontaine
Closes Homebrew/homebrew#36308. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-10-06Compare patchlevels numerically rather than lexicallyJack Nagel
Fixes Homebrew/homebrew#32960.
2014-07-03Add assert_eql to provide better failure messages for eql? testsJack Nagel
2014-07-03Fix PkgVersion#<=>Jack Nagel
2014-06-23Fix directory leak in test_pathname_versionJack Nagel
2014-06-18Move test helpers into Homebrew::TestCaseJack Nagel
2014-06-18Use a custom test class so we can avoid monkeypatchingJack Nagel
2014-01-11Fix tokenizing openssl style versionsJack Nagel
Fixes Homebrew/homebrew#25736.
2013-12-09Implement hash equality for VersionJack Nagel
2013-10-25Disallow initializing Versions with non-stringsJack Nagel
Closes Homebrew/homebrew#23553.
2013-09-20At some point this started working againJack Nagel
2013-08-03versions: remove perforce bottle detection.Mike McQuaid
2013-07-24Adjust logic to properly sort erlang versionsJack Nagel
Fixes Homebrew/homebrew#21417.
2013-06-30Fixed several broken sourceforge.net download locationsVictor Martinez
Closes Homebrew/homebrew#20645. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-06-20perforce: add version detection regex.Mike McQuaid
2013-06-10Add failing test for a misdetected versionJack Nagel
2013-06-05Improve tokenization of version stringsJack Nagel
Tokens like "b4", "beta1", "p195", &c. are now treated as atoms rather than being broken down even further. Additionally, we enable support for padding in the middle of versions strings, so we can successfully compare something like "2.1-p195" with "2.1.0-p194" by inferring that "2.1" is really "2.1.0". This fixes the comparison "9.9.3-P1" > "9.9.3" which previously has not been handled correctly.
2013-06-05Add failing test for patchlevel version comparisonsJack Nagel
2013-04-24Add a couple more version testsJack Nagel
2013-04-24Split up big version detection testJack Nagel
2013-04-13Use assert_operatorJack Nagel
2013-04-13Improved formula attribute validationJack Nagel
The initializer for Formula does a number of validations, but it does them in a weird order, and some attributes aren't validated under certain circumstances. This became even more of a mess when most software package attributes were moved into the SoftwareSpec class. This commit removes the last vestiges of storing these attributes as instance variables. In particular, it eliminates #set_instance_variable and #validate_variable, replacing them with methods that operate on SoftwareSpec instances, and generate more useful errors. Doing these validations unconditionally in the initializer means we bail out much earlier if the formula has invalid attributes or is not fully specified, and no longer need to validate in #prefix. Technically we don't need to validate in #brew either, but we continue to do so anyway as a safety measure, and because we cannot enforce calls to super in subclasses.
2013-04-08Fix specs in TestBallJack Nagel
2013-03-28Suppress ambiguous argument and grouped expression warningsJack Nagel
2013-02-18Remove unused variablesJack Nagel
2013-02-07Flesh out MacOSVersion testsJack Nagel
2013-01-30jpeg: support version format.Mike McQuaid
2013-01-29Don't use underscores in (new) bottle filenames.Mike McQuaid
Closes Homebrew/homebrew#14270
2013-01-29Cleanup old bottle syntax.Mike McQuaid