Rename samples.txt -> samples.pr

This commit is contained in:
Tony Garnock-Jones 2021-03-17 09:08:07 +01:00
parent 434279ab66
commit 425e7dd5cb
3 changed files with 5 additions and 5 deletions

View File

@ -6,10 +6,10 @@ import * as fs from 'fs';
describe('reading common test suite', () => {
const samples_bin = fs.readFileSync(__dirname + '/../../../../../tests/samples.bin');
const samples_txt = fs.readFileSync(__dirname + '/../../../../../tests/samples.txt', 'utf-8');
const samples_pr = fs.readFileSync(__dirname + '/../../../../../tests/samples.pr', 'utf-8');
it('should read equal to decoded binary without annotations', () => {
const s1 = new Reader(samples_txt, { decodePointer: readPointer, includeAnnotations: false }).next();
const s1 = new Reader(samples_pr, { decodePointer: readPointer, includeAnnotations: false }).next();
const s2 = new Decoder(samples_bin, { includeAnnotations: false }).withPointerDecoder(
decodePointer,
d => d.next());
@ -17,7 +17,7 @@ describe('reading common test suite', () => {
});
it('should read equal to decoded binary with annotations', () => {
const s1 = new Reader(samples_txt, { decodePointer: readPointer, includeAnnotations: true }).next();
const s1 = new Reader(samples_pr, { decodePointer: readPointer, includeAnnotations: true }).next();
const s2 = new Decoder(samples_bin, { includeAnnotations: true }).withPointerDecoder(
decodePointer,
d => d.next());
@ -25,7 +25,7 @@ describe('reading common test suite', () => {
});
it('should read and encode back to binary with annotations', () => {
const s = new Reader(samples_txt, { decodePointer: readPointer, includeAnnotations: true }).next();
const s = new Reader(samples_pr, { decodePointer: readPointer, includeAnnotations: true }).next();
const bs = Bytes.toIO(encode(s, {
encodePointer,
includeAnnotations: true,

View File

@ -1,6 +1,6 @@
all: samples.bin
samples.bin: samples.txt
samples.bin: samples.pr
racket ../implementations/racket/preserves/preserves/tool.rkt --atob < $< > $@.tmp || (rm -f $@.tmp; false)
mv $@.tmp $@