Navigation Menu

Skip to content

Commit

Permalink
html_untag: add a test for cast failure case
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 26, 2013
1 parent dc17e63 commit eaf494d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
@@ -0,0 +1,39 @@
table_create Keywords TABLE_PAT_KEY ShortText
[[0,0.0,0.0],true]
table_create Entries TABLE_NO_KEY
[[0,0.0,0.0],true]
column_create Entries keyword COLUMN_SCALAR Keywords
[[0,0.0,0.0],true]
load --table Entries
[
{"keyword": "groonga-<em>mroonga</em>-developers"}
]
[[0,0.0,0.0],1]
select Entries --output_columns "html_untag(keyword)" --command_version 2
[
[
[
-22,
0.0,
0.0
],
"failed to cast to text: <#<record:pat:Keywords id:1 key:\"groonga-<em>mroonga</em>-developers\">>"
],
[
[
[
1
],
[
[
"html_untag",
"null"
]
],
[
"failed to cast to text: <#<record:pat:Keywords id:1 key:\"groonga-<em>mroonga</em>-developers\">>"
]
]
]
]
#|e| failed to cast to text: <#<record:pat:Keywords id:1 key:"groonga-<em>mroonga</em>-developers">>
13 changes: 13 additions & 0 deletions test/command/suite/select/function/html_untag/cast_failure.test
@@ -0,0 +1,13 @@
table_create Keywords TABLE_PAT_KEY ShortText

table_create Entries TABLE_NO_KEY
column_create Entries keyword COLUMN_SCALAR Keywords

load --table Entries
[
{"keyword": "groonga-<em>mroonga</em>-developers"}
]

select Entries \
--output_columns "html_untag(keyword)" \
--command_version 2

0 comments on commit eaf494d

Please sign in to comment.