Skip to content

Commit

Permalink
"default locale" tests -> "en" tests (depends on "en" being installed…
Browse files Browse the repository at this point in the history
…, but doesn't depend on it being system default).

"de" locale test now handles locales that would have been similar enough to "de" to cause a failure.
Add a "default" locale test that just sanity checks A!=B.
  • Loading branch information
ChrisLoer committed Mar 26, 2018
1 parent 40d7f9d commit 62865d3
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expression": ["case",
["==", ["resolved-locale", ["collator", true, false, "de"]], "de"],
["==", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, false, "de"]],
["!=", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, false, "de"]]
["case", ["==", ["get", "rhs"], "ue"], true, false]
],
"inputs": [
[{}, {"properties": {"lhs": "ü", "rhs": "ue"}}],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"expression": ["<", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, false]],
"expression": ["<", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, false, "en"]],
"inputs": [
[{}, {"properties": {"lhs": "a", "rhs": "ä"}}],
[{}, {"properties": {"lhs": "a", "rhs": "A"}}],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"expression": ["!", ["!=", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, false]]],
"expression": ["!", ["!=", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, false, "en"]]],
"inputs": [
[{}, {"properties": {"lhs": "a", "rhs": "ä"}}],
[{}, {"properties": {"lhs": "a", "rhs": "A"}}],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"expression": ["==", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", false, false]],
"inputs": [
[{}, {"properties": {"lhs": "a", "rhs": "a"}}],
[{}, {"properties": {"lhs": "A", "rhs": "A"}}],
[{}, {"properties": {"lhs": "b", "rhs": "a"}}]
],
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "boolean"
},
"outputs": [true, true, false],
"serialized": "string"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"expression": ["==", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", false, false]],
"expression": ["==", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", false, false, "en"]],
"inputs": [
[{}, {"properties": {"lhs": "a", "rhs": "ä"}}],
[{}, {"properties": {"lhs": "a", "rhs": "A"}}],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"expression": [">", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", false, false]],
"expression": [">", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", false, false, "en"]],
"inputs": [
[{}, {"properties": {"lhs": "a", "rhs": "ä"}}],
[{}, {"properties": {"lhs": "a", "rhs": "A"}}],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"expression": ["<=", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", false, true]],
"expression": ["<=", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", false, true, "en"]],
"inputs": [
[{}, {"properties": {"lhs": "ä", "rhs": "a"}}],
[{}, {"properties": {"lhs": "A", "rhs": "a"}}],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"expression": ["!", ["!=", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", false, true]]],
"expression": ["!", ["!=", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", false, true, "en"]]],
"inputs": [
[{}, {"properties": {"lhs": "a", "rhs": "ä"}}],
[{}, {"properties": {"lhs": "a", "rhs": "A"}}],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"expression": ["==", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, true]],
"expression": ["==", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, true, "en"]],
"inputs": [
[{}, {"properties": {"lhs": "a", "rhs": "ä"}}],
[{}, {"properties": {"lhs": "a", "rhs": "A"}}],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"expression": [">=", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, true]],
"expression": [">=", ["string",["get", "lhs"]], ["get", "rhs"], ["collator", true, true, "en"]],
"inputs": [
[{}, {"properties": {"lhs": "a", "rhs": "ä"}}],
[{}, {"properties": {"lhs": "a", "rhs": "A"}}],
Expand Down

0 comments on commit 62865d3

Please sign in to comment.