@@ -79,6 +79,17 @@ public void testQuotedXSDStringLiteral() throws Exception {
7979 assertEquals ("?test\n \" example\" \n " , result );
8080 }
8181
82+ @ Test
83+ public void testQuotedXSDStringLiteralLang () throws Exception {
84+ List <String > bindingNames = List .of ("test" );
85+ TupleQueryResult tqr = new IteratingTupleQueryResult (bindingNames ,
86+ List .of (new ListBindingSet (bindingNames ,
87+ SimpleValueFactory .getInstance ().createLiteral ("example" , "en" ))));
88+ String result = writeTupleResult (tqr );
89+ assertEquals ("?test\n " +
90+ "\" example\" @en\n " , result );
91+ }
92+
8293 @ Test
8394 public void testQuotedXSDStringLiteralWithSpecialCharacters () throws Exception {
8495 List <String > bindingNames = List .of ("test" );
@@ -89,6 +100,17 @@ public void testQuotedXSDStringLiteralWithSpecialCharacters() throws Exception {
89100 assertEquals ("?test\n \" example\\ twith\\ nspecial\\ \" characters\" \n " , result );
90101 }
91102
103+ @ Test
104+ public void testIRI () throws Exception {
105+ List <String > bindingNames = List .of ("test" );
106+ TupleQueryResult tqr = new IteratingTupleQueryResult (bindingNames ,
107+ List .of (new ListBindingSet (bindingNames ,
108+ SimpleValueFactory .getInstance ().createIRI ("http://example.org/1" ))));
109+ String result = writeTupleResult (tqr );
110+ assertEquals ("?test\n " +
111+ "<http://example.org/1>\n " , result );
112+ }
113+
92114 private String writeTupleResult (TupleQueryResult tqr )
93115 throws IOException , TupleQueryResultHandlerException , QueryEvaluationException {
94116 ByteArrayOutputStream output = new ByteArrayOutputStream ();
0 commit comments