this repo has no description

ee

12Me21 9e2764ff 59828d00

+47 -35
+1
testing/common.css
··· 32 32 flex-grow: 1; 33 33 flex-shrink: 1; 34 34 min-height: 0; 35 + flex-basis: 0; 35 36 } 36 37 37 38 .Split {
+17 -5
testing/draw.js
··· 1 1 function 𐀶([html]) { 2 2 let temp = document.createElement('template') 3 - temp.innerHTML = html 4 - let elem = temp.content.firstChild 5 - return elem.cloneNode.bind(elem, true) 3 + temp.innerHTML = html.replace(/\s*?\n\s*/g, "") 4 + let node = temp.content.firstChild 5 + return document.importNode.bind(document, node, true) 6 6 } 7 7 8 - let RESULT = 𐀶`<test- class=Row><div class=Col><name-></name-><result- class=fill></result-></div><input- class=fill></input->` // p autoclose select by id? 8 + let RESULT = 𐀶` 9 + <test- class=Row> 10 + <div class=Col> 11 + <name-></name-> 12 + <result-></result-> 13 + </div> 14 + <col2- class='fill Col'> 15 + <input- class='fill'></input-> 16 + </col2-> 17 + </test-> 18 + ` // p autoclose select by id? 9 19 10 20 Test.prototype.draw_result = function() { 11 21 let d = RESULT() ··· 17 27 d.querySelector('name-').textContent = this.name 18 28 d.querySelector('input-').textContent = this.input 19 29 let result = this.result 20 - if (this.status > 0) 30 + if (this.status > 0) { 21 31 result += " ["+(+this.parse_time).toFixed(1)+" ms]" 32 + d.querySelector('div').className = "Row" 33 + } 22 34 d.querySelector('result-').textContent = result 23 35 //d.querySelector('time-').textContent = 24 36
+6 -29
testing/index.html
··· 1 - <!doctype html><html lang=en-QS><meta charset="utf-8"> 1 + <!doctype html><html lang=en-QS><meta charset=utf-8> 2 2 <title>Markup2 Tests</title> 3 3 4 4 <script src=../parse.js></script> ··· 13 13 14 14 opened: <time id=$start_time></time> | duration: <time id=$duration></time> 15 15 <table class='data'> 16 - <tr> 17 - <th> total <th> passed <th> pending <th> failed 18 - <tr> 19 - <td id=$table_total> ? <td id=$table_passed> ? <td id=$table_pending> ? <td id=$table_failed> ? 16 + <tr> <th> total <th> passed <th> pending <th> failed 17 + <tr> <td id=$table_total> ? <td id=$table_passed> ? <td id=$table_pending> ? <td id=$table_failed> ? 20 18 </table> 21 19 <hr> 22 20 <div id=$output></div> 23 21 24 22 <script>'use strict' 25 23 let start = performance.timing.fetchStart 26 - $start_time.textContent = new Date(start).toLocaleString([], {year:'numeric', month:'long', day:'numeric', hour:'numeric', minute:'2-digit',second:'numeric'}) 24 + $start_time.textContent = new Date(start).toLocaleString() 27 25 28 - async function run(data) { 26 + function run(data) { 29 27 $output.textContent = "" 30 28 31 29 Test.load_text(data) ··· 33 31 let total, pending 34 32 let passed = 0, failed = 0 35 33 total = pending = Test.all.length 36 - 37 34 $table_total.textContent = total 38 35 function draw() { 39 36 $table_passed.textContent = passed 40 37 $table_failed.textContent = failed 41 38 $table_pending.textContent = pending 42 39 } 43 - 44 40 draw() 45 41 46 - let prev = 0 47 42 for (let test of Test.all) { 48 - /*let t = performance.now() 49 - if (t > prev+1000/30) { 50 - prev = t 51 - await {then: fn=>setTimeout(fn)} 52 - }*/ 53 43 test.run() 54 44 if (test.status > 0) { 55 45 $output.append(test.draw_result()) ··· 68 58 let data = $data.textContent 69 59 run(data) 70 60 }) 71 - 72 - /* 73 - // this makes the tests/results render immediately when the page loads, 74 - // but it's actually /too fast/ and it's hard to tell whether the tests actually ran 75 - 76 - let x = new MutationObserver((events, observer)=>{ 77 - let pt = events.find(e=>e.target.id=='$data') 78 - observer.disconnect() 79 - run(pt.target.textContent) 80 - }).observe(document.body, { 81 - childList: true, 82 - subtree: true, 83 - })*/ 84 61 </script> 85 62 86 63 <!-- <plaintext> goes until EOF, so the </plaintext> tag is fake --> 87 64 <!-- (I just use it so editors won't indent the contents) --> 88 65 <plaintext id=$data hidden></plaintext> 89 66 🟩 wake up! 90 - |[1x1] /uwu/ | 67 + |[2x1] /uwu/ | 91 68 ## `owo` 92 69 🟩 {"type":"ROOT","content":[{"type":"table","args":null,"content":[{"type":"table_row","args":{},"content":[{"type":"table_cell","args":{"colspan":2},"content":[{"type":"italic","args":null,"content":["uwu"]}]}]}]},{"type":"heading","args":{"level":2},"content":[{"type":"icode","args":{"text":"owo"}}]}],"prev":"block"} 93 70
+9 -1
testing/style.css
··· 15 15 margin: 3px; 16 16 white-space: pre-wrap; 17 17 font: 0.8em sans-serif; 18 - height: 2.2rem; 19 18 } 20 19 test-.passed { 21 20 background: #7F6; ··· 56 55 overflow-y: auto; 57 56 } 58 57 58 + test- col2- { 59 + } 60 + 59 61 #\$output { 60 62 background: white; 61 63 } ··· 75 77 #\$table_pending { 76 78 background: #e0c87f70; 77 79 } 80 + 81 + /* box-shadow: 0 0 3px inset red; 82 + background: linear-gradient(#0003, #FFF8 4px calc(100% - 4px), #0003); 83 + background-attachment: scroll; 84 + background-attachment: local; 85 + }*/
+14
testing/test.js
··· 243 243 this.pop() 244 244 } 245 245 } 246 + 247 + 248 + /* 249 + // this makes the tests/results render immediately when the page loads, 250 + // but it's actually /too fast/ and it's hard to tell whether the tests actually ran 251 + 252 + let x = new MutationObserver((events, observer)=>{ 253 + let pt = events.find(e=>e.target.id=='$data') 254 + observer.disconnect() 255 + run(pt.target.textContent) 256 + }).observe(document.body, { 257 + childList: true, 258 + subtree: true, 259 + })*/