1#
2#                           TERMS AND CONDITIONS
3#                                   FOR
4#                         OPEN SOURCE CODE LICENSE
5#                               Version 1.1
6#
7# Japan Registry Services Co., Ltd. ("JPRS"), a Japanese corporation
8# having its head office at Chiyoda First Bldg. East 13F 3-8-1 Nishi-Kanda,
9# Chiyoda-ku, Tokyo 101-0065, Japan, grants you the license for open source
10# code specified in EXHIBIT A the "Code" subject to the following Terms and
11# Conditions ("OSCL").
12#
13# 1. License Grant.
14#   JPRS hereby grants you a worldwide, royalty-free, non-exclusive
15#   license, subject to third party intellectual property claims:
16#   (a) under intellectual property rights (other than patent or
17#       trademark) licensable by JPRS to use, reproduce, modify, display,
18#       perform, sublicense and distribute the Code (or portions thereof)
19#       with or without modifications, and/or as part of a derivative work;
20#       or
21#   (b) under claims of the infringement through the making, using,
22#       offering to sell and/or otherwise disposing the JPRS Revised Code
23#       (or portions thereof);
24#   (c) the licenses granted in this Section 1(a) and (b) are effective on
25#       the date JPRS first distributes the Code to you under the terms of
26#       this OSCL;
27#   (d) Notwithstanding the above stated terms, no patent license is
28#       granted:
29#       1)  for a code that you delete from the Code;
30#       2)  separate from the Code; or
31#       3)  for infringements caused by:
32#            i) modification of the Code; or
33#           ii) combination of the Code with other software or devices.
34#
35# 2. Consents.
36#   You agree that:
37#   (a) you must include a copy of this OSCL and the notice set forth in
38#       EXHIBIT A with every copy of the Code you distribute;
39#   (b) you must include a copy of this OSCL and the notice set forth in
40#       EXHIBIT A with every copy of binary form of the Code in the
41#       documentation and/or other materials provided with the distribution;
42#   (c) you may not offer or impose any terms on any source code version
43#       that alters or restricts the applicable version of this OSCL or
44#       the recipients' rights hereunder.
45#   (d) If the terms and conditions are set forth in EXHIBIT A, you must
46#       comply with those terms and conditions.
47#
48# 3. Proprietary Information.
49#   All trademarks, service marks, patents, copyrights, trade secrets, and
50#   other proprietary rights in or related to the Code are and will remain
51#   the exclusive property of JPRS or its licensors, whether or not
52#   specifically recognized or perfected under local law except specified
53#   in this OSCL; provided however you agree and understand that the JPRS
54#   name may not be used to endorse or promote this Code without prior
55#   written approval of JPRS.
56#
57# 4. WARRANTY DISCLAIMER.
58#   JPRS MAKES NO REPRESENTATIONS AND WARRANTIES REGARDING THE USE OF THE
59#   CODE, NOR DOES JPRS MAKE ANY REPRESENTATIONS THAT THE CODE WILL BECOME
60#   COMMERCIALLY AVAILABLE. JPRS, ITS AFFILIATES, AND ITS SUPPLIERS DO NOT
61#   WARRANT OR REPRESENT THAT THE CODE IS FREE OF ERRORS OR THAT THE CODE
62#   IS SUITABLE FOR TRANSLATION AND/OR LOCALIZATION. THE CODE IS PROVIDED
63#   ON AN "AS IS" BASIS AND JPRS AND ITS SUPPLIERS HAVE NO OBLIGATION TO
64#   CORRECT ERRORS OR TO SUPPORT THE CODE UNDER THIS OSCL FOR ANY REASON.
65#   TO THE FULL EXTENT PERMITTED BY LAW, ALL OBLIGATIONS ARE HEREBY
66#   EXCLUDED WHETHER EXPRESS, STATUTORY OR IMPLIED UNDER LAW, COURSE OF
67#   DEALING, CUSTOM, TRADE USAGE, ORAL OR WRITTEN STATEMENT OR OTHERWISE,
68#   INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY
69#   OR FITNESS FOR A PARTICULAR PURPOSE CONCERNING THE CODE.
70#
71# 5. NO LIABILITY.
72#   UNDER NO CIRCUMSTANCES SHALL JPRS AND/OR ITS AFFILIATES, LICENSORS, OR
73#   REPRESENTATIVES BE LIABLE FOR ANY DAMAGES INCLUDING BUT NOT LIMITED TO
74#   CONSEQUENTIAL, INDIRECT, SPECIAL, PUNITIVE OR INCIDENTAL DAMAGES,
75#   WHETHER FORESEEABLE OR UNFORESEEABLE, BASED ON YOUR CLAIMS, INCLUDING,
76#   BUT NOT LIMITED TO, CLAIMS FOR LOSS OF DATA, GOODWILL, PROFITS, USE OF
77#   MONEY, INTERRUPTION IN USE OR AVAILABILITY OF DATA, STOPPAGE, IMPLIED
78#   WARRANTY, BREACH OF CONTRACT, MISREPRESENTATION, NEGLIGENCE, STRICT
79#   LIABILITY IN TORT, OR OTHERWISE.
80#
81# 6. Indemnification.
82#   You hereby agree to indemnify, defend, and hold harmless JPRS for any
83#   liability incurred by JRPS due to your terms of warranty, support,
84#   indemnity, or liability offered by you to any third party.
85#
86# 7. Termination.
87# 7.1 This OSCL shall be automatically terminated in the events that:
88#   (a) You fail to comply with the terms herein and fail to cure such
89#       breach within 30 days of becoming aware of the breach;
90#   (b) You initiate patent or copyright infringement litigation against
91#       any party (including a cross-claim or counterclaim in a lawsuit)
92#       alleging that the Code constitutes a direct or indirect patent or
93#       copyright infringement, in such case, this OSCL to you shall
94#       terminate as of the date such litigation is filed;
95# 7.2 In the event of termination under Sections 7.1(a) or 7.1(b) above,
96#     all end user license agreements (excluding distributors and
97#     resellers) which have been validly granted by You or any distributor
98#     hereunder prior to termination shall survive termination.
99#
100#
101# 8. General.
102#   This OSCL shall be governed by, and construed and enforced in
103#   accordance with, the laws of Japan. Any litigation or arbitration
104#   between the parties shall be conducted exclusively in Tokyo, Japan
105#   except written consent of JPRS provides other venue.
106#
107#
108#                                EXHIBIT A
109#
110# The original open source code of idnkit-2 is idnkit-1.0 developed and
111# conceived by Japan Network Information Center ("JPNIC"), a Japanese
112# association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
113# Chiyoda-ku, Tokyo 101-0047, Japan, and JPRS modifies above original code
114# under following Terms and Conditions set forth by JPNIC.
115#
116#                                  JPNIC
117#
118# Copyright (c) 2000-2002 Japan Network Information Center.  All rights reserved.
119#
120# By using this file, you agree to the terms and conditions set forth bellow.
121#
122#                       LICENSE TERMS AND CONDITIONS
123#
124# The following License Terms and Conditions apply, unless a different
125# license is obtained from Japan Network Information Center ("JPNIC"),
126# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
127# Chiyoda-ku, Tokyo 101-0047, Japan.
128#
129# 1. Use, Modification and Redistribution (including distribution of any
130#    modified or derived work) in source and/or binary forms is permitted
131#    under this License Terms and Conditions.
132#
133# 2. Redistribution of source code must retain the copyright notices as they
134#    appear in each source code file, this License Terms and Conditions.
135#
136# 3. Redistribution in binary form must reproduce the Copyright Notice,
137#    this License Terms and Conditions, in the documentation and/or other
138#    materials provided with the distribution. For the purposes of binary
139#    distribution the "Copyright Notice" refers to the following language:
140#    "Copyright (c) 2000-2002 Japan Network Information Center.  All rights reserved."
141#
142# 4. The name of JPNIC may not be used to endorse or promote products
143#    derived from this Software without specific prior written approval of
144#    JPNIC.
145#
146# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
147#    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
148#    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
149#    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
150#    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
151#    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
152#    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
153#    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
154#    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
155#    OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
156#    ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
157#
158#
159#                        JPRS Public License Notice
160#                                   For
161#                                idnkit-2.
162#
163# The contents of this file are subject to the Terms and Conditions for
164# the Open Source Code License (the "OSCL"). You may not use this file
165# except in compliance with above terms and conditions. A copy of the OSCL
166# is available at <http://jprs.co.jp/idn/>.
167# The JPRS Revised Code is idnkit-2.
168# The Initial Developer of the JPRS Revised Code is Japan Network
169# Information Center ("JPNIC"), a Japanese association,
170# Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, Chiyoda-ku, Tokyo
171# 101-0047, Japan.
172# "Copyright (c) 2000-2002 Japan Network Information Center.  All rights reserved."
173# "Copyright (c) 2010-2012 Japan Registry Services Co., Ltd.  All rights reserved."
174# Contributor(s): ______________________________________.
175#
176# If you wish to allow use of your version of this file only under the
177# above License(s) and not to allow others to use your version of this
178# file, please indicate your decision by deleting the relevant provisions
179# above and replacing them with the notice and other provisions required
180# by the above License(s). If you do not delete the relevant provisions,
181# a recipient may use your version of this file under either the above
182# License(s).
183#
184
185#
186# Tests about idncheck command.
187#
188--
189#
190# idncheck command test.
191# NAME is an valid IDN.
192#
193             api: command
194  local_encoding: U-escape
195         command: ../../tools/idncheck/idncheck -c /dev/null '\u{e0}'
196          output: passed.
197        exitcode: 0
198--
199#
200# idncheck command test.
201# NAME is not an valid IDN.
202#
203             api: command
204  local_encoding: U-escape
205         command: ../../tools/idncheck/idncheck -c /dev/null XN--0CA..
206          output: label length check failed
207        exitcode: 2
208--
209#
210# idncheck command test.
211# The command line lacks NAME.
212#
213             api: command
214         command: ../../tools/idncheck/idncheck -c /dev/null
215          output: too few argument.
216          output: try 'idncheck -help' for more information.
217        exitcode: 3
218--
219#
220# idncheck command test.
221# The command line has an extra argument.
222#
223             api: command
224         command: ../../tools/idncheck/idncheck -c /dev/null XN--0CA XN--0CA
225          output: too many arguments.
226          output: try 'idncheck -help' for more information.
227        exitcode: 3
228--
229#
230# idncheck command test.
231# Test '-in' option.
232#
233             api: command
234  local_encoding: UTF-8
235         command: ../../tools/idncheck/idncheck -c /dev/null -in U-escape '\u{e0}'
236          output: passed.
237        exitcode: 0
238--
239#
240# idncheck command test.
241# Test '-i' option.
242#
243             api: command
244  local_encoding: UTF-8
245         command: ../../tools/idncheck/idncheck -c /dev/null -i U-escape '\u{e0}'
246          output: passed.
247        exitcode: 0
248--
249#
250# idncheck command test.
251# Test '-in' option without an argument.
252#
253             api: command
254         command: ../../tools/idncheck/idncheck -c /dev/null -in
255          output: option '-in' requires an argument.
256          output: try 'idncheck -help' for more information.
257        exitcode: 3
258--
259#
260# idncheck command test.
261# Test '-i' option without an argument.
262#
263             api: command
264         command: ../../tools/idncheck/idncheck -c /dev/null -i
265          output: option '-i' requires an argument.
266          output: try 'idncheck -help' for more information.
267        exitcode: 3
268--
269#
270# idncheck command test.
271# Test '-conf' option.
272#
273             api: command
274  local_encoding: UTF-8
275            conf: map delimitermap
276            conf: delimiters 0040
277         command: ../../tools/idncheck/idncheck -conf @CONF_FILE@ a@b
278          output: passed.
279        exitcode: 0
280--
281#
282# idncheck command test.
283# Test '-c' option.
284#
285             api: command
286  local_encoding: UTF-8
287            conf: map delimitermap
288            conf: delimiters 0040
289         command: ../../tools/idncheck/idncheck -c @CONF_FILE@ a@b
290          output: passed.
291        exitcode: 0
292--
293#
294# idncheck command test.
295# Test '-conf' option without an argument.
296#
297             api: command
298         command: ../../tools/idncheck/idncheck -conf
299          output: option '-conf' requires an argument.
300          output: try 'idncheck -help' for more information.
301        exitcode: 3
302--
303#
304# idncheck command test.
305# Test '-c' option without an argument.
306#
307             api: command
308         command: ../../tools/idncheck/idncheck -c
309          output: option '-c' requires an argument.
310          output: try 'idncheck -help' for more information.
311        exitcode: 3
312--
313#
314# idncheck command test.
315# Test '-noconf' option.
316#
317             api: command
318  local_encoding: UTF-8
319            conf: map delimitermap
320            conf: delimiters 0040
321         command: ../../tools/idncheck/idncheck -conf @CONF_FILE@ -noconf a@b
322          output: prohibited code point check failed
323        exitcode: 2
324--
325#
326# idncheck command test.
327# Test '-C' option.
328#
329             api: command
330  local_encoding: UTF-8
331            conf: map delimitermap
332            conf: delimiters 0040
333         command: ../../tools/idncheck/idncheck -c @CONF_FILE@ -C a@b
334          output: prohibited code point check failed
335        exitcode: 2
336--
337#
338# idncheck command test.
339# Test '-registration' option.
340#
341             api: command
342  local_encoding: UTF-8
343         command: ../../tools/idncheck/idncheck -c /dev/null -registration aaa-
344          output: hyphen check failed
345        exitcode: 2
346--
347#
348# idncheck command test.
349# Test '-g' option.
350#
351             api: command
352  local_encoding: UTF-8
353         command: ../../tools/idncheck/idncheck -c /dev/null -g aaa-
354          output: hyphen check failed
355        exitcode: 2
356--
357#
358# idncheck command test.
359# Test '-lookup' option.
360#
361             api: command
362  local_encoding: UTF-8
363         command: ../../tools/idncheck/idncheck -c /dev/null -lookup aaa-
364          output: passed.
365        exitcode: 0
366--
367#
368# idncheck command test.
369# Test '-l' option.
370#
371             api: command
372  local_encoding: UTF-8
373         command: ../../tools/idncheck/idncheck -c /dev/null -l aaa-
374          output: passed.
375        exitcode: 0
376--
377#
378# idncheck command test.
379# Specify both '-registration' and '-lookup' option.
380#
381             api: command
382  local_encoding: UTF-8
383         command: ../../tools/idncheck/idncheck -c /dev/null -registration -lookup aaa-
384          output: passed.
385        exitcode: 0
386--
387#
388# idncheck command test.
389# Specify both '-lookup' and '-registration' option.
390#
391             api: command
392  local_encoding: UTF-8
393         command: ../../tools/idncheck/idncheck -c /dev/null -lookup -registration aaa-
394          output: hyphen check failed
395        exitcode: 2
396--
397#
398# idncheck command test.
399# Specify both '-g' and '-l' option.
400#
401             api: command
402  local_encoding: UTF-8
403         command: ../../tools/idncheck/idncheck -c /dev/null -g -l aaa-
404          output: passed.
405        exitcode: 0
406--
407#
408# idncheck command test.
409# Specify both '-l' and '-g' option.
410#
411             api: command
412  local_encoding: UTF-8
413         command: ../../tools/idncheck/idncheck -c /dev/null -l -g aaa-
414          output: hyphen check failed
415        exitcode: 2
416--
417#
418# idncheck command test.
419# Test '-nomap' option.
420#
421             api: command
422  local_encoding: UTF-8
423            conf: map delimitermap
424            conf: delimiters 0040
425         command: ../../tools/idncheck/idncheck -c @CONF_FILE@ -nomap a@b
426          output: prohibited code point check failed
427        exitcode: 2
428--
429#
430# idncheck command test.
431# Test '-M' option.
432#
433             api: command
434  local_encoding: UTF-8
435            conf: map delimitermap
436            conf: delimiters 0040
437         command: ../../tools/idncheck/idncheck -c @CONF_FILE@ -M a@b
438          output: prohibited code point check failed
439        exitcode: 2
440--
441#
442# idncheck command test.
443# Test '-skip' option (with one action name).
444#
445             api: command
446  local_encoding: UTF-8
447         command: ../../tools/idncheck/idncheck -c /dev/null -skip prohcheck @@
448          output: passed.
449        exitcode: 0
450--
451#
452# idncheck command test.
453# Test '-skip' option (with multiple action names).
454#
455             api: command
456  local_encoding: UTF-8
457         command: ../../tools/idncheck/idncheck -c /dev/null -skip prohcheck,hyphcheck @@-
458          output: passed.
459        exitcode: 0
460--
461#
462# idncheck command test.
463# Test '-skip' option (specify '-skip' twice).
464#
465             api: command
466  local_encoding: UTF-8
467         command: ../../tools/idncheck/idncheck -c /dev/null -skip prohcheck -skip hyphcheck @@-
468          output: passed.
469        exitcode: 0
470--
471#
472# idncheck command test.
473# Test '-skip' option.
474# The argument of '-skip' ends with ','.
475#
476             api: command
477         command: ../../tools/idncheck/idncheck -c /dev/null -skip prohcheck, @@-
478          output: invalid argument to option '-skip'.
479          output: try 'idncheck -help' for more information.
480        exitcode: 3
481--
482#
483# idncheck command test.
484# Test '-skip' option.
485# The argument of '-skip' is just ','.
486#
487             api: command
488         command: ../../tools/idncheck/idncheck -c /dev/null -skip , @@-
489          output: invalid argument to option '-skip'.
490          output: try 'idncheck -help' for more information.
491        exitcode: 3
492--
493#
494# idncheck command test.
495# Test '-skip' option.
496# The argument of '-skip' is missing.
497#
498             api: command
499         command: ../../tools/idncheck/idncheck -c /dev/null -skip
500          output: option '-skip' requires an argument.
501          output: try 'idncheck -help' for more information.
502        exitcode: 3
503--
504#
505# idncheck command test.
506# Test '-skip' option.
507# The argument of '-skip' is unknown action name.
508#
509             api: command
510         command: ../../tools/idncheck/idncheck -c /dev/null -skip unknown aaa
511          output: invalid argument to option '-skip'.
512          output: try 'idncheck -help' for more information.
513        exitcode: 3
514--
515#
516# idncheck command test.
517# Test '-skip' option.
518# The argument of '-skip' contains unknown action name.
519#
520             api: command
521         command: ../../tools/idncheck/idncheck -c /dev/null -skip idnconv,unknown aaa
522          output: invalid argument to option '-skip'.
523          output: try 'idncheck -help' for more information.
524        exitcode: 3
525--
526#
527# idncheck command test.
528# Test '-skip' option.
529# The argument of '-skip' contains empty action name.
530#
531             api: command
532         command: ../../tools/idncheck/idncheck -c /dev/null -skip idnconv,,prohcheck aaa
533        exitcode: 3
534          output: invalid argument to option '-skip'.
535          output: try 'idncheck -help' for more information.
536--
537#
538# idncheck command test.
539# Test '-quiet' option.
540#
541             api: command
542  local_encoding: UTF-8
543         command: ../../tools/idncheck/idncheck -c /dev/null -quiet aaa | wc -l | sed -e 's/^ *//'
544          output: 0
545        exitcode: 0
546--
547#
548# idncheck command test.
549# Test '-q' option.
550#
551             api: command
552  local_encoding: UTF-8
553         command: ../../tools/idncheck/idncheck -c /dev/null -q aaa | wc -l | sed -e 's/^ *//'
554          output: 0
555        exitcode: 0
556--
557#
558# idncheck command test.
559# Test '-localcheck' option.
560#
561             api: command
562  local_encoding: UTF-8
563        localset: 0061..0062
564         command: ../../tools/idncheck/idncheck -c /dev/null -localcheck @LOCALSET_FILE@ abc
565          output: local check failed
566        exitcode: 2
567--
568#
569# idncheck command test.
570# Test '-l' option.
571#
572             api: command
573  local_encoding: UTF-8
574        localset: 0061..0062
575         command: ../../tools/idncheck/idncheck -c /dev/null -e @LOCALSET_FILE@ abc
576          output: local check failed
577        exitcode: 2
578--
579#
580# idncheck command test.
581# Test '-localcheck' option without an argument.
582#
583             api: command
584        localset: 0061..0062
585         command: ../../tools/idncheck/idncheck -c /dev/null -localcheck
586          output: option '-localcheck' requires an argument.
587          output: try 'idncheck -help' for more information.
588        exitcode: 3
589--
590#
591# idncheck command test.
592# Test '-e' option without an argument.
593#
594             api: command
595        localset: 0061..0062
596         command: ../../tools/idncheck/idncheck -c /dev/null -e
597          output: option '-e' requires an argument.
598          output: try 'idncheck -help' for more information.
599        exitcode: 3
600--
601#
602# idncheck command test.
603# Test '-test' option.
604#
605             api: command
606  local_encoding: UTF-8
607            conf: language ja
608         command: ../../tools/idncheck/idncheck -c @CONF_FILE@ -i U-escape -test
609          output: language = ja
610          output: input encoding = U-escape
611        exitcode: 0
612--
613#
614# idncheck command test.
615# Test '-t' option.
616#
617             api: command
618  local_encoding: UTF-8
619            conf: language ja
620         command: ../../tools/idncheck/idncheck -c @CONF_FILE@ -i U-escape -t
621          output: language = ja
622          output: input encoding = U-escape
623        exitcode: 0
624--
625#
626# idncheck command test.
627# Test '-version' option.
628#
629             api: command
630         command: ../../tools/idncheck/idncheck -version 2>&1 | sed -e 's/:.*$//'
631          output: idncheck (idnkit) version
632          output: Unicode version
633        exitcode: 0
634--
635#
636# idncheck command test.
637# Test '-v' option.
638#
639             api: command
640         command: ../../tools/idncheck/idncheck -v 2>&1 | sed -e 's/:.*$//'
641          output: idncheck (idnkit) version
642          output: Unicode version
643        exitcode: 0
644--
645#
646# idncheck command test.
647# Test '-help' option.
648#
649             api: command
650         command: ../../tools/idncheck/idncheck -help 2>&1 | head -1
651          output: Usage: idncheck [options..] name
652        exitcode: 0
653--
654#
655# idncheck command test.
656# Test '-h' option.
657#
658             api: command
659         command: ../../tools/idncheck/idncheck -h 2>&1 | head -1
660          output: Usage: idncheck [options..] name
661        exitcode: 0
662--
663#
664# idncheck command test.
665# Specify unknown option '-X'.
666#
667             api: command
668         command: ../../tools/idncheck/idncheck -X 2>&1
669          output: unrecognized option '-X'.
670          output: try 'idncheck -help' for more information.
671        exitcode: 3
672--
673