Просмотр исходного кода

Merge pull request #553 from janl/escaped-lookup-test

Assert null lookup when rendering an unescaped value
tags/v2.3.0
David da Silva 10 лет назад
Родитель
Сommit
9017163785
5 измененных файлов: 32 добавлений и 30 удалений
  1. +1
    -0
      test/_files/escaped.js
  2. +1
    -1
      test/_files/escaped.mustache
  3. +27
    -27
      test/_files/null_lookup_object.js
  4. +2
    -1
      test/_files/unescaped.js
  5. +1
    -1
      test/_files/unescaped.mustache

+ 1
- 0
test/_files/escaped.js Просмотреть файл

@@ -2,5 +2,6 @@
title: function () {
return "Bear > Shark";
},
symbol: null,
entities: "&quot; \"'<>`=/"
})

+ 1
- 1
test/_files/escaped.mustache Просмотреть файл

@@ -1,2 +1,2 @@
<h1>{{title}}</h1>
<h1>{{title}}{{symbol}}</h1>
And even {{entities}}, but not {{{entities}}}.

+ 27
- 27
test/_files/null_lookup_object.js Просмотреть файл

@@ -1,31 +1,31 @@
({
"name": "David",
"twitter": "@dasilvacontin",
"fobject": [
{
"name": "Flor",
"twitter": "@florrts"
},
{
"name": "Miquel",
"twitter": null
},
{
"name": "Chris",
"twitter": undefined
}
],
"favorites": {
"color": "blue",
"president": "Bush",
"show": "Futurama"
"name": "David",
"twitter": "@dasilvacontin",
"fobject": [
{
"name": "Flor",
"twitter": "@florrts"
},
{
"name": "Miquel",
"twitter": null
},
"mascot": {
"name": "Squid",
"favorites": {
"color": "orange",
"president": undefined,
"show": null
}
{
"name": "Chris",
"twitter": undefined
}
],
"favorites": {
"color": "blue",
"president": "Bush",
"show": "Futurama"
},
"mascot": {
"name": "Squid",
"favorites": {
"color": "orange",
"president": undefined,
"show": null
}
}
})

+ 2
- 1
test/_files/unescaped.js Просмотреть файл

@@ -1,5 +1,6 @@
({
title: function () {
return "Bear > Shark";
}
},
symbol: null
})

+ 1
- 1
test/_files/unescaped.mustache Просмотреть файл

@@ -1 +1 @@
<h1>{{{title}}}</h1>
<h1>{{{title}}}{{{symbol}}}</h1>

Загрузка…
Отмена
Сохранить