Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip level on debian 8 #751

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/lookup.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"prefix": "v",
"flaky": ["aix", "s390"],
"maintainers": ["ralphtheninja", "vweevers"],
"skip": "win32"
"skip": ["win32", "debian-8"]
},
"leveldown": {
"prefix": "v",
Expand Down
1 change: 1 addition & 0 deletions lib/match-conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function isStringMatch(conditions) {
const checks = [
distro,
release,
[distro, release].join('-'),
version,
[platform, arch].join('-'),
endian,
Expand Down
13 changes: 13 additions & 0 deletions test/test-match-conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ function testPlatforms(t, testFunction) {
revertShim();
}

function testDistros(t, testFunction) {
shim();
t.ok(testFunction('macos-10.12.2'), 'macos-10.12.2 is matched');
t.ok(testFunction('macos'), 'macos is matched');
t.ok(testFunction('10.12.2'), '10.12.2 is matched');
t.notok(testFunction('macos-1.1.1'), 'macos-1.1.1 is not matched');
t.notok(testFunction('debian'), 'debian is not matched');
t.notok(testFunction('1.1.1'), '1.1.1 is not matched');
revertShim();
}

function testArrays(t, testFunction) {
shim();
t.ok(
Expand Down Expand Up @@ -127,6 +138,7 @@ test('isStringMatch', (t) => {
const isStringMatch = isMatch.__get__('isStringMatch');
testVersions(t, isStringMatch);
testPlatforms(t, isStringMatch);
testDistros(t, isStringMatch);
t.end();
});

Expand All @@ -145,6 +157,7 @@ test('isArrayMatch', (t) => {
test('isMatch', (t) => {
testVersions(t, isMatch);
testPlatforms(t, isMatch);
testDistros(t, isMatch);
testArrays(t, isMatch);
testObjects(t, isMatch);
t.ok(isMatch(true), 'true is matched');
Expand Down