-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% extends 'base.Portfile' %} | ||
|
||
{% block portgroup %} | ||
PortGroup haskell 1.0 | ||
{% endblock %} | ||
{% block nameversion %} | ||
haskell.setup {{ pkg._pkgname() }} {{ pkg.upt_pkg.version }} | ||
revision 0 | ||
{% endblock %} | ||
|
||
{% block dist_info %} | ||
homepage {{ pkg.upt_pkg.homepage }} | ||
{% endblock %} | ||
|
||
{% block versions %} | ||
depends_lib-append \ | ||
{% for i in pkg.upt_pkg.requirements.run|sort(attribute='name') %} | ||
port:hs-{{i.name|lower}}{% if not loop.last %} \ | ||
{% endif %} | ||
{% endfor %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import unittest | ||
|
||
import upt | ||
|
||
from upt_macports.upt_macports import MacPortsHackagePackage | ||
|
||
|
||
class TestMacPortsHackagePackage(unittest.TestCase): | ||
def setUp(self): | ||
self.package = MacPortsHackagePackage() | ||
self.package.upt_pkg = upt.Package('test-pkg', '13.37') | ||
|
||
def test_pkgname(self): | ||
expected = ['Foo', 'foo', 'Foo-bar', 'foo-bar'] | ||
names = ['Foo', 'foo', 'Foo-bar', 'foo-bar'] | ||
for (name, expected_name) in zip(names, expected): | ||
self.package.upt_pkg = upt.Package(name, '13.37') | ||
self.assertEqual(self.package._pkgname(), expected_name) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters