Przeglądaj źródła

Added 3-level deep nesting test

Fixes #42
tags/0.5.2
Michael Jackson 13 lat temu
rodzic
commit
a8a0392cd6
4 zmienionych plików z 46 dodań i 1 usunięć
  1. +0
    -1
      mustache.js
  2. +19
    -0
      test/_files/grandparent_context.js
  3. +10
    -0
      test/_files/grandparent_context.mustache
  4. +17
    -0
      test/_files/grandparent_context.txt

+ 0
- 1
mustache.js Wyświetl plik

@@ -610,5 +610,4 @@ var Mustache;
}

return exports;

}())));

+ 19
- 0
test/_files/grandparent_context.js Wyświetl plik

@@ -0,0 +1,19 @@
({
grand_parent_id: 'grand_parent1',
parent_contexts: [
{
parent_id: 'parent1',
child_contexts: [
{ child_id: 'parent1-child1' },
{ child_id: 'parent1-child2' }
]
},
{
parent_id: 'parent2',
child_contexts: [
{ child_id: 'parent2-child1' },
{ child_id: 'parent2-child2' }
]
}
]
})

+ 10
- 0
test/_files/grandparent_context.mustache Wyświetl plik

@@ -0,0 +1,10 @@
{{grand_parent_id}}
{{#parent_contexts}}
{{grand_parent_id}}
{{parent_id}}
{{#child_contexts}}
{{grand_parent_id}}
{{parent_id}}
{{child_id}}
{{/child_contexts}}
{{/parent_contexts}}

+ 17
- 0
test/_files/grandparent_context.txt Wyświetl plik

@@ -0,0 +1,17 @@
grand_parent1
grand_parent1
parent1
grand_parent1
parent1
parent1-child1
grand_parent1
parent1
parent1-child2
grand_parent1
parent2
grand_parent1
parent2
parent2-child1
grand_parent1
parent2
parent2-child2

Ładowanie…
Anuluj
Zapisz