Fix conflicts

This commit is contained in:
Jerome Wu
2020-05-05 18:16:52 +08:00
5 changed files with 95 additions and 1 deletions

View File

@@ -25,3 +25,38 @@ describe('transcode()', () => {
});
});
});
describe('run()', () => {
describe('should run a command with quoted parameters at start no spaces', () => {
['flame.avi'].forEach((name) => (
it(`run ${name}`, async () => {
await ffmpeg.write(name, `${BASE_URL}/${name}`);
await ffmpeg.run(`-y -i ${name} -metadata 'title="test"' output.mp4`);
const data = ffmpeg.read('output.mp4');
expect(data.length).to.be(META_FLAME_MP4_LENGTH_NO_SPACE);
}).timeout(TIMEOUT)
));
});
describe('should run a command with quoted parameters at start and a space in between', () => {
['flame.avi'].forEach((name) => (
it(`run ${name}`, async () => {
await ffmpeg.write(name, `${BASE_URL}/${name}`);
await ffmpeg.run(`-y -i ${name} -metadata 'title="my title"' output.mp4`);
const data = ffmpeg.read('output.mp4');
expect(data.length).to.be(META_FLAME_MP4_LENGTH);
}).timeout(TIMEOUT)
));
});
describe('should run a command with name quoted parameters and a space in between', () => {
['flame.avi'].forEach((name) => (
it(`run ${name}`, async () => {
await ffmpeg.write(name, `${BASE_URL}/${name}`);
await ffmpeg.run(`-y -i ${name} -metadata title="my title" output.mp4`);
const data = ffmpeg.read('output.mp4');
expect(data.length).to.be(META_FLAME_MP4_LENGTH);
}).timeout(TIMEOUT)
));
});
});