-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #44 and some small changes Squashed commit of the following: commit 2df8ad62d63837435c38aee264c8f31426fda239 Author: mnater <mathiasnater@gmail.com> Date: Fri Nov 23 15:07:30 2018 +0100 fix test18 commit 22ed6e0f9aa6aa5b845097a5cbc3d2a77619ec28 Author: mnater <mathiasnater@gmail.com> Date: Fri Nov 23 07:50:31 2018 +0100 fix test5 (sr-latn) commit 63cb1a018581df6a424c9ce63beb032ff1c84aec Author: mnater <mathiasnater@gmail.com> Date: Thu Nov 22 23:37:08 2018 +0100 fix removing of non exstend styles element commit 7fee39baaef346c6182a7659fb91a43e528650fc Author: mnater <mathiasnater@gmail.com> Date: Thu Nov 22 23:28:39 2018 +0100 remove log commit 8bb7d7f7e18ec4c4ba227706e21064756a9240c7 Author: mnater <mathiasnater@gmail.com> Date: Thu Nov 22 23:28:21 2018 +0100 make langs case-insensitiv commit 3be0877315d6da7d1e20af5caa2bc27f4f39a422 Merge: 2da4508 aae3fd2 Author: mnater <mathiasnater@gmail.com> Date: Tue Nov 20 21:56:37 2018 +0100 Merge branch 'master' into lang commit 2da4508135882ffb3127f060f1deea2d7c29f502 Author: mnater <mathiasnater@gmail.com> Date: Tue Nov 20 21:52:10 2018 +0100 create testcase
- Loading branch information
Showing
6 changed files
with
164 additions
and
39 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
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
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
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,119 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
<title>Test 029</title> | ||
<script> | ||
var Hyphenopoly = { | ||
require: { | ||
"en-us": "FORCEHYPHENOPOLY", | ||
"en-au": "FORCEHYPHENOPOLY", | ||
"de": "FORCEHYPHENOPOLY", | ||
"de-ch": "FORCEHYPHENOPOLY", | ||
"fr": "FORCEHYPHENOPOLY" | ||
}, | ||
fallbacks: { | ||
"en-au": "en-gb", | ||
"de-ch": "de" | ||
}, | ||
paths: { | ||
maindir: "../", | ||
patterndir: "../patterns/" | ||
}, | ||
setup: { | ||
hide: "all", | ||
classnames: { | ||
"hyphenate": { | ||
hyphen: "|" | ||
} | ||
} | ||
}, | ||
handleEvent: { | ||
hyphenopolyEnd: function (e) { | ||
assert(); | ||
} | ||
} | ||
}; | ||
|
||
function assert() { | ||
var tests = 6; | ||
var i = 1; | ||
var test = ""; | ||
var ref = ""; | ||
var result = true; | ||
while (i <= tests) { | ||
test = document.getElementById("test" + i).innerHTML; | ||
ref = document.getElementById("ref" + i).innerHTML; | ||
if (test === ref) { | ||
document.getElementById("result").innerHTML += "<span style=\"background-color: #d6ffd6\">" + (function (i) { | ||
return (i < 10) ? "0" + i : i; | ||
}(i)) + "</span> "; | ||
result = result && true; | ||
} else { | ||
document.getElementById("result").innerHTML += "<span style=\"background-color: #ffd6d6\">" + (function (i) { | ||
return (i < 10) ? "0" + i : i; | ||
}(i)) + "</span> "; | ||
result = false; | ||
} | ||
i += 1; | ||
} | ||
if (parent != window) { | ||
parent.postMessage(JSON.stringify({ | ||
desc: document.getElementById("desc").innerHTML, | ||
index: 29, | ||
result: (result ? "passed" : "failed") | ||
}), window.location.href); | ||
} | ||
} | ||
</script> | ||
<script src="../Hyphenopoly_Loader.js"></script> | ||
<style type="text/css"> | ||
body { | ||
width:50%; | ||
margin-left:25%; | ||
margin-right:25%; | ||
} | ||
|
||
.test { | ||
background-color: #D8E2F9; | ||
} | ||
.ref { | ||
background-color: #FEEFC0; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<div id="navigate"><a href="index.html">↞ Index</a> | <a href="test28.html">← Prev</a> | <a href="test30.html">Next →</a></div> | ||
|
||
<h1>Test 029</h1> | ||
<p id="desc">Check case-insensitiveness of lang attributes and fallbacks.</p> | ||
<div id="result">R: </div> | ||
<hr> | ||
<h2>1: en-us</h2> | ||
<p id="test1" class="test hyphenate" lang="en-us">A hyphenation algorithm is a set of rules that decides at which points a word can be broken over two lines with a hyphen.</p> | ||
<p id="ref1" class="ref" lang="en-us">A hy|phen|ation al|go|rithm is a set of rules that de|cides at which points a word can be bro|ken over two lines with a hy|phen.</p> | ||
|
||
<h2>2: en-US</h2> | ||
<p id="test2" class="test hyphenate" lang="en-US">A hyphenation algorithm is a set of rules that decides at which points a word can be broken over two lines with a hyphen.</p> | ||
<p id="ref2" class="ref" lang="en-US">A hy|phen|ation al|go|rithm is a set of rules that de|cides at which points a word can be bro|ken over two lines with a hy|phen.</p> | ||
|
||
<h2>3: en-au (fallback to en-gb)</h2> | ||
<p id="test3" class="test hyphenate" lang="en-au">A hyphenation algorithm is a set of rules that decides at which points a word can be broken over two lines with a hyphen.</p> | ||
<p id="ref3" class="ref" lang="en-au">A hy|phen|a|tion al|gorithm is a set of rules that de|cides at which points a word can be broken over two lines with a hy|phen.</p> | ||
|
||
<h2>4: en-AU (fallback to en-gb)</h2> | ||
<p id="test4" class="test hyphenate" lang="en-AU">A hyphenation algorithm is a set of rules that decides at which points a word can be broken over two lines with a hyphen.</p> | ||
<p id="ref4" class="ref" lang="en-AU">A hy|phen|a|tion al|gorithm is a set of rules that de|cides at which points a word can be broken over two lines with a hy|phen.</p> | ||
|
||
<h2>5: de</h2> | ||
<p id="test5" class="test hyphenate" lang="de">Die Worttrennung, auch Silbentrennung genannt, bezeichnet in der Orthographie die Art und Weise, wie die Wörter insbesondere am Zeilenende getrennt werden können.</p> | ||
<p id="ref5" class="ref" class="ref" lang="de">Die Wort|tren|nung, auch Sil|ben|tren|nung ge|nannt, be|zeich|net in der Or|tho|gra|phie die Art und Weise, wie die Wör|ter ins|be|son|de|re am Zei|len|en|de ge|trennt wer|den kön|nen.</p> | ||
|
||
<h2>6: de-DE (fallback to de)</h2> | ||
<p id="test6" class="test hyphenate" lang="de-CH">Die Worttrennung, auch Silbentrennung genannt, bezeichnet in der Orthographie die Art und Weise, wie die Wörter insbesondere am Zeilenende getrennt werden können.</p> | ||
<p id="ref6" class="ref" class="ref" lang="de-CH">Die Wort|tren|nung, auch Sil|ben|tren|nung ge|nannt, be|zeich|net in der Or|tho|gra|phie die Art und Weise, wie die Wör|ter ins|be|son|de|re am Zei|len|en|de ge|trennt wer|den kön|nen.</p> | ||
<hr> | ||
<div><span class="test">Test</span> <span class="ref">Ref</span></div> | ||
</body> | ||
</html> |
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
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