tricu

An interpreted language for exploring Tree Calculus
Log | Files | Refs | README | LICENSE

resume.test.mjs (576B)


      1 import test from 'node:test';
      2 import assert from 'node:assert/strict';
      3 import {resumeValue} from '../dist/io.js';
      4 test('resume kinds and bounded Unicode lines are checked without consuming a retry',()=>{
      5  assert.equal(resumeValue('step',undefined),'');
      6  for(const v of ['',false,7,null])assert.equal(resumeValue('step',v),undefined);
      7  for(const v of [undefined,null,7,'\n','\r','\ud800','\udfff','a'.repeat(257),'🙂'.repeat(257)])assert.equal(resumeValue('input',v),undefined);
      8  for(const v of ['','λ雪🙂','🙂'.repeat(256)])assert.equal(resumeValue('input',v),v);
      9 });