<?xml version="1.0" encoding="UTF-8"?>
<test-data
    xmlns="http://pmd.sourceforge.net/rule-tests"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests http://pmd.sourceforge.net/rule-tests_1_0_0.xsd">

    <test-code>
        <description>No header</description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
<%@ page import="com.foo.MyClass"%>
        ]]></code>
    </test-code>

    <test-code>
        <description>Good page header</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
        ]]></code>
    </test-code>

    <test-code>
        <description>Good page header 2</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
<%@ page import="should.ignore.this.one" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="should.ignore.this.one" %>
        ]]></code>
    </test-code>

    <test-code>
        <description>Encoding is not UTF-8</description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"/>
        ]]></code>
    </test-code>

    <test-code>
        <description>Good meta header</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
        ]]></code>
    </test-code>

    <test-code>
        <description>Good meta header 2</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
<meta http-equiv="Content-Language" content="nl-NL"/>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta http-equiv="Content-Language" content="nl-NL"/>
        ]]></code>
    </test-code>

    <test-code>
        <description>Issue #369</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://topjava.javawebinar.ru/functions" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Meal list</title>
    <link rel="stylesheet" href="css/style.css">
</head>
</html>
        ]]></code>
    </test-code>
</test-data>
