Comment:

    Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

Comment:

        A set of test headers to test parameter list parsing and
	especially RFC 2231 decoding.
        Use with "paramtest -p <paramdata".

	All tests assume "mail.mime.decodeparameters" is set to "true",
	which is done at the start of paramtest.

        CAREFUL: a blank line in this file causes everything following it
                 to be ignored until a line starting with "From " (so that
                 paramtest -p can be pointed at a real mailbox).

From start here
Comment:
	This set of headers are all good and test RFC 2231 decoding.
Content-Type: application/x-stuff;
	title*0*=us-ascii'en'This%20is%20even%20more%20;
	title*1*=%2A%2A%2Afun%2A%2A%2A%20;
	title*2="isn't it!"
Expect: 1
	title=This is even more ***fun*** isn't it!
Content-Type: application/x-stuff;
	title*0*=''This%20is%20even%20more%20;
	title*1*=%2A%2A%2Afun%2A%2A%2A%20;
	title*2="isn't it!"
Expect: 1
	title=This is even more ***fun*** isn't it!
Content-Type: application/x-stuff;
	title*2="isn't it!";
	title*1*=%2A%2A%2Afun%2A%2A%2A%20;
	title*0*=us-ascii'en'This%20is%20even%20more%20
Expect: 1
	title=This is even more ***fun*** isn't it!
Content-Type: application/x-stuff;
	title*2="isn't it!";
	title*1*=%2A%2A%2Afun%2A%2A%2A%20;
	title*0*=us-ascii'en'This%20is%20even%20more%20;
	name*0="one ";
	name*1="two ";
	name*2="three";
	p*=us-ascii'en'This%20is%20fun;
Expect: 3
	title=This is even more ***fun*** isn't it!
	name=one two three
	p=This is fun
Content-Type: application/x-stuff;
	title*2="isn't it!";
	title*1*=%2A%2A%2Afun%2A%2A%2A%20;
	title*0*=us-ascii'en'This%20is%20even%20more%20;
	name*0="one ";
	name*1="two ";
	name*2="three";
	p*=us-ascii'en'This%20is%20fun
Expect: 3
	title=This is even more ***fun*** isn't it!
	name=one two three
	p=This is fun
Content-Type: application/x-stuff;
	title*2="isn't it!";
	name*1="two ";
	title*1*=%2A%2A%2Afun%2A%2A%2A%20;
	name*0="one ";
	title*0*=us-ascii'en'This%20is%20even%20more%20;
	name*2="three";
	p*=us-ascii'en'This%20is%20fun
Expect: 3
	title=This is even more ***fun*** isn't it!
	name=one two three
	p=This is fun
Comment:
	These headers test error cases that don't generate parse exceptions.
	.
Content-Type: application/x-stuff;
	title*0*=us-ascii'en'This%20is%20even%20more%20;
	title*1*=%2A%2A%2Afun%2A%2A%2A;
	title*3="isn't it!"
Expect: 2
	title=This is even more ***fun***
	title*3=isn't it!
Content-Type: application/x-stuff;
	title*0*=us-ascii'en'This%20is%20even%20more%20;
	title*1*=%2A%2A%2Afun%2A%2A%2A;
	title*3*="isn't it!"
Expect: 2
	title=This is even more ***fun***
	title*3=isn't it!
Comment:
	This is an error case with no right answer.
	Should we assume earlier segments are missing and just decode
	this segment?  Or should we assume that the "*3" is part of
	the parameter name and this is a single segment encoded parameter?
	Currently we do the former.
Content-Type: application/x-stuff; title*3*=us-ascii'en'isn't%20it!
Expect: 1
	title*3=us-ascii'en'isn't it!
Content-Type: application/x-stuff; title*3*=unknown'en'isn't%20it!
Expect: 1
	title*3=unknown'en'isn't it!
Content-Type: application/x-stuff;
	title*0*=us-ascii'en'This%20is%20even%20more%20;
	title*1*=%XX%2A%2Afun%2A%2A%2A%20;
	title*2="isn't it!"
Expect: 1
	title=This is even more %XX**fun*** isn't it!
Content-Type: application/x-stuff;
	title*0*=us-ascii'en'This%20is%20even%20more%20;
	title*1="***fun***";
	title*2*=%20isn't%20it!
Expect: 1
	title=This is even more ***fun*** isn't it!
Content-Type: image/png;
	name*0*=ISO-2022-JP''%1B%24B%24%22%24%24%24%26%24%28%24*%24%22%24%24%24%26;
	name*1*=%24%28%24*%24%22%24%24%24%26%24%28%24*%24%22%24%24%24%26%24%28;
	name*2*=%24*%1B%28B.png
Expect: 1
	name=\u3042\u3044\u3046\u3048\u304a\u3042\u3044\u3046\u3048\u304a\u3042\u3044\u3046\u3048\u304a\u3042\u3044\u3046\u3048\u304a.png
Content-Type: image/png;
	filename*0*=ISO-2022-JP''%1B%24B%24%22%24%24%24%26%24%28%24*%24%22%24%24;
	filename*1*=%24%26%24%28%24*%24%22%24%24%24%26%24%28%24*%24%22%24%24%24;
	filename*2*=%26%24%28%24*%1B%28B.png
Expect: 1
	filename=\u3042\u3044\u3046\u3048\u304a\u3042\u3044\u3046\u3048\u304a\u3042\u3044\u3046\u3048\u304a\u3042\u3044\u3046\u3048\u304a.png
