aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_versions.rb
AgeCommit message (Collapse)Author
2015-02-26Remove SourceForge references.Mike McQuaid
It was fun but we just love Bintray more than you. Closes #37211. Closes #37213. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-01-30Fix more version misdetections for URLs with archsBaptiste Fontaine
Closes #36368. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-01-28Fix version misdetections for URLs with OS/archsBaptiste Fontaine
Closes #36308. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-10-06Compare patchlevels numerically rather than lexicallyJack Nagel
Fixes #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 #25736.
2013-12-09Implement hash equality for VersionJack Nagel
2013-10-25Disallow initializing Versions with non-stringsJack Nagel
Closes #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 #21417.
2013-06-30Fixed several broken sourceforge.net download locationsVictor Martinez
Closes #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 #14270
2013-01-29Cleanup old bottle syntax.Mike McQuaid
2013-01-01Add Apache version style test.Mike McQuaid
2012-12-16Add another Erlang version format.Mike McQuaid
2012-10-16Add Jenkins version matching (and test).Mike McQuaid
2012-08-25erlang: fix version detection and bottles.Mike McQuaid
2012-08-23Version: make MacOSVersion comparison more robustJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Test version interrogation methodsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Simplify version comparison testsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Version: build-in devel version comparisonsJack Nagel
The heuristic used by the default version comparison is simple. A version string is scanned for strings of digits, split into an array of these strings, and then an element-wise comparison is done. This fails when presented with something like Version.new("1.0.0beta7") <=> Version.new("1.0.0") because the first three digits match, and the fourth digit of the receiver (7) is greater than the assumed fourth digit of the parameter (0). Fix this by defining an element-wise comparator on a new VersionElement class. This allows us to correctly compare "alpha", "beta", and "rc" style version strings, and keeps the logic out of the main version comparison. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Add custom comparator for MacOS.versionJack Nagel
This will allow us to do comparisons like if MacOS.version >= :lion and hopefully deprecate the MacOS.<name>? family of methods, which are counterinitutive.
2012-08-18Replace version strings with Version objectsJack Nagel
2012-08-18Further version test refactoringJack Nagel
2012-08-18Move version detection to Version classJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Initial version comparison implementationJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Preliminary version test refactoringJack Nagel
2012-08-09Deprecate ancient formula syntaxJack Nagel
Closes #13444. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04tests: clean up whitespaceJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Prune some requires from test filesJack Nagel
testing_env already requires utils; set up the ARGV and ENV extensions there as well. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-24Change versioned bottle syntax and fix issues.Mike McQuaid
Fixed #11562.
2012-04-24Revert "Change versioned bottle syntax and fix issues."Mike McQuaid
This reverts commit f80908bead8b620ebcc5cdde9de65e70598002b6.