줄바꿈을 LF로 통일
서버에서 바로 빌드하고 고칠 수 있게 저장소 줄바꿈을 LF로 맞췄습니다. CRLF로 들어가 있던 sh 빌드 스크립트도 이제 리눅스에서 그대로 돌아갑니다. 내용은 바뀌지 않았습니다.
This commit is contained in:
1 parent
40615838ac
commit
2d48091205
623 files changed
+501372
-501365
No files matched your search
+33
-33
@@ -1,33 +1,33 @@
|
||||
// 1.6.8: a program that does not fit any more is refused when it is chosen, with the KB that are missing.
|
||||
// node test/ui_room_test.js <paradise.bin> <out_dir> <firmware...>
|
||||
const { chromium } = require('playwright');
|
||||
const fs = require('fs'), path = require('path');
|
||||
(async () => {
|
||||
const [rom, out, ...fws] = process.argv.slice(2);
|
||||
fs.mkdirSync(out, { recursive: true });
|
||||
let bad = 0; const ok = (c, m) => { console.log((c ? 'ok ' : 'FAIL ') + m); if (!c) bad++; };
|
||||
const b = await chromium.launch(); const p = await b.newPage({ viewport: { width: 1280, height: 900 }, acceptDownloads: true });
|
||||
const errors = []; p.on('pageerror', (e) => errors.push(e.message));
|
||||
await p.addInitScript(() => { try { localStorage.setItem('paramix-lang', 'de'); } catch (e) {} });
|
||||
await p.goto('file://' + path.resolve(__dirname, '../dist/ParamixStudio.html'));
|
||||
await p.setInputFiles('#fileRom', rom); await p.waitForSelector('#work.on', { timeout: 60000 }); await p.waitForTimeout(2000);
|
||||
await p.click('.tab[data-tab="feld"]'); if (!(await p.isChecked('#launchOn'))) await p.click('#launchOn'); await p.waitForTimeout(1500);
|
||||
await p.click('.tab[data-tab="emu"]');
|
||||
let refused = '';
|
||||
for (const f of fws) {
|
||||
await p.evaluate(() => { document.getElementById('toast').textContent = ''; });
|
||||
const n0 = await p.$$eval('#appsList .prow', (l) => l.length);
|
||||
await p.setInputFiles('#fileEmu', f);
|
||||
await p.waitForFunction((n) => document.getElementById('toast').textContent || document.querySelectorAll('#appsList .prow').length !== n, n0, { timeout: 300000 }).catch(() => {});
|
||||
await p.waitForFunction(() => !document.getElementById('busy').classList.contains('on'), null, { timeout: 300000 }); await p.waitForTimeout(1500);
|
||||
const tt = (await p.textContent('#toast', { timeout: 5000 }).catch(() => '')) || ''; console.log(path.basename(f), '->', tt.slice(0, 100));
|
||||
if (/keinen Platz/.test(tt)) { refused = tt; break; }
|
||||
}
|
||||
ok(/es fehlen etwa \d+ KB/.test(refused), 'refused with the KB missing: ' + refused);
|
||||
const n = await p.$$eval('#appsList .prow', (l) => l.length);
|
||||
const dlp = p.waitForEvent('download', { timeout: 300000 }); await p.click('#btnSave');
|
||||
const dl = await Promise.race([dlp, p.waitForTimeout(240000).then(() => null)]);
|
||||
ok(!!dl, 'the rest still saves (' + n + ' programs)');
|
||||
ok(!errors.length, 'no page errors ' + errors.join('; '));
|
||||
await b.close(); console.log(bad ? bad + ' FAILED' : 'all good'); process.exit(bad ? 1 : 0);
|
||||
})();
|
||||
// 1.6.8: a program that does not fit any more is refused when it is chosen, with the KB that are missing.
|
||||
// node test/ui_room_test.js <paradise.bin> <out_dir> <firmware...>
|
||||
const { chromium } = require('playwright');
|
||||
const fs = require('fs'), path = require('path');
|
||||
(async () => {
|
||||
const [rom, out, ...fws] = process.argv.slice(2);
|
||||
fs.mkdirSync(out, { recursive: true });
|
||||
let bad = 0; const ok = (c, m) => { console.log((c ? 'ok ' : 'FAIL ') + m); if (!c) bad++; };
|
||||
const b = await chromium.launch(); const p = await b.newPage({ viewport: { width: 1280, height: 900 }, acceptDownloads: true });
|
||||
const errors = []; p.on('pageerror', (e) => errors.push(e.message));
|
||||
await p.addInitScript(() => { try { localStorage.setItem('paramix-lang', 'de'); } catch (e) {} });
|
||||
await p.goto('file://' + path.resolve(__dirname, '../dist/ParamixStudio.html'));
|
||||
await p.setInputFiles('#fileRom', rom); await p.waitForSelector('#work.on', { timeout: 60000 }); await p.waitForTimeout(2000);
|
||||
await p.click('.tab[data-tab="feld"]'); if (!(await p.isChecked('#launchOn'))) await p.click('#launchOn'); await p.waitForTimeout(1500);
|
||||
await p.click('.tab[data-tab="emu"]');
|
||||
let refused = '';
|
||||
for (const f of fws) {
|
||||
await p.evaluate(() => { document.getElementById('toast').textContent = ''; });
|
||||
const n0 = await p.$$eval('#appsList .prow', (l) => l.length);
|
||||
await p.setInputFiles('#fileEmu', f);
|
||||
await p.waitForFunction((n) => document.getElementById('toast').textContent || document.querySelectorAll('#appsList .prow').length !== n, n0, { timeout: 300000 }).catch(() => {});
|
||||
await p.waitForFunction(() => !document.getElementById('busy').classList.contains('on'), null, { timeout: 300000 }); await p.waitForTimeout(1500);
|
||||
const tt = (await p.textContent('#toast', { timeout: 5000 }).catch(() => '')) || ''; console.log(path.basename(f), '->', tt.slice(0, 100));
|
||||
if (/keinen Platz/.test(tt)) { refused = tt; break; }
|
||||
}
|
||||
ok(/es fehlen etwa \d+ KB/.test(refused), 'refused with the KB missing: ' + refused);
|
||||
const n = await p.$$eval('#appsList .prow', (l) => l.length);
|
||||
const dlp = p.waitForEvent('download', { timeout: 300000 }); await p.click('#btnSave');
|
||||
const dl = await Promise.race([dlp, p.waitForTimeout(240000).then(() => null)]);
|
||||
ok(!!dl, 'the rest still saves (' + n + ' programs)');
|
||||
ok(!errors.length, 'no page errors ' + errors.join('; '));
|
||||
await b.close(); console.log(bad ? bad + ' FAILED' : 'all good'); process.exit(bad ? 1 : 0);
|
||||
})();
|
||||
Reference in new issue
Block a user