update CLI tests to fix version number thing

pull/1501/head
Rich Harris 7 years ago
parent d3201603d9
commit 48c885bcbb

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
function create_main_fragment(component, ctx) {
var p;

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
function create_main_fragment(component, ctx) {
var p;

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
const __file = "src/Main.html";

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
import Widget from './Widget.html';

@ -1,4 +1,4 @@
/* src/Widget.html generated by Svelte v2.6.6 */
/* src/Widget.html generated by Svelte vx.y.z */
function create_main_fragment(component, ctx) {
var p;

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
import Widget from './widget/Widget.html';

@ -1,4 +1,4 @@
/* src/widget/Widget.html generated by Svelte v2.6.6 */
/* src/widget/Widget.html generated by Svelte vx.y.z */
function create_main_fragment(component, ctx) {
var p;

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
import Widget from './Widget.html';

@ -1,4 +1,4 @@
/* src/Widget.html generated by Svelte v2.6.6 */
/* src/Widget.html generated by Svelte vx.y.z */
function create_main_fragment(component, ctx) {
var p;

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
var Main = (function(answer) { "use strict";
answer = (answer && answer.__esModule) ? answer["default"] : answer;

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
function create_main_fragment(component, ctx) {
var p;

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
function create_main_fragment(component, ctx) {
var p;

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte v2.6.6 */
/* src/Main.html generated by Svelte vx.y.z */
function create_main_fragment(component, ctx) {
var h1, text, text_1;

@ -1,4 +1,5 @@
const sander = require('sander');
const glob = require('tiny-glob/sync');
process.chdir(__dirname);
@ -6,5 +7,14 @@ sander.readdirSync('samples').forEach(dir => {
if (dir[0] === '.') return;
sander.rimrafSync(`samples/${dir}/expected`);
sander.copydirSync(`samples/${dir}/actual`).to(`samples/${dir}/expected`);
const files = glob(`**`, { cwd: `samples/${dir}/actual`, filesOnly: true });
files.forEach(file => {
const source = sander.readFileSync(`samples/${dir}/actual/${file}`, { encoding: 'utf-8' });
sander.writeFileSync(
`samples/${dir}/expected/${file}`,
source.replace(/generated by Svelte v(\d+\.\d+\.\d+)/, 'generated by Svelte vx.y.z')
);
});
});
Loading…
Cancel
Save