This commit is contained in:
synth-ruiner
2017-12-22 17:22:08 +00:00
commit 495f1d958e
3484 changed files with 393731 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
exports[`test #2436 - block with a same name extends from different layout in nesting 1`] = `
"
<h1>layout </h1>
<p>Main A</p>
<h1>other layout</h1>
<p>Other A</p>"
`;
exports[`test #2436 - block with a same name extends from the same layout in nesting 1`] = `
"
<h1>layout </h1>
<p>Main A</p>
<h1>layout </h1>
<p>Other A</p>"
`;

17
node_modules/pug/test/regression-2436/index.test.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
const pug = require('../../');
test('#2436 - block with a same name extends from the same layout in nesting', () => {
const output = pug.renderFile(
__dirname + '/issue1.pug',
{pretty: true}
);
expect(output).toMatchSnapshot();
});
test('#2436 - block with a same name extends from different layout in nesting', () => {
const output = pug.renderFile(
__dirname + '/issue2.pug',
{pretty: true}
);
expect(output).toMatchSnapshot();
});

7
node_modules/pug/test/regression-2436/issue1.pug generated vendored Normal file
View File

@@ -0,0 +1,7 @@
extends layout.pug
block a
p Main A
block b
include other1.pug

7
node_modules/pug/test/regression-2436/issue2.pug generated vendored Normal file
View File

@@ -0,0 +1,7 @@
extends layout.pug
block a
p Main A
block b
include other2.pug

6
node_modules/pug/test/regression-2436/layout.pug generated vendored Normal file
View File

@@ -0,0 +1,6 @@
h1 layout
block a
p block in layout
block b

4
node_modules/pug/test/regression-2436/other1.pug generated vendored Normal file
View File

@@ -0,0 +1,4 @@
extends layout.pug
block a
p Other A

4
node_modules/pug/test/regression-2436/other2.pug generated vendored Normal file
View File

@@ -0,0 +1,4 @@
extends other_layout.pug
block a
p Other A

View File

@@ -0,0 +1,4 @@
h1 other layout
block a
p block in other layout