1--TEST--
2locale_get_all_variants.phpt()
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5--FILE--
6<?php
7
8/*
9 * Try parsing different Locales
10 * with Procedural and Object methods.
11 */
12
13function ut_main()
14{
15	$locales  = array(
16		'sl_IT_nedis_KIRTI',
17		'sl_IT_nedis-a-kirti-x-xyz',
18		'sl_IT_rozaj',
19		'sl_IT_NEDIS_ROJAZ_1901',
20		'i-enochian',
21		'zh-hakka',
22		'zh-wuu',
23		'i-tay',
24		'sgn-BE-nl',
25		'sgn-CH-de',
26		'sl_IT_rozaj@currency=EUR'
27	);
28    $res_str = '';
29	foreach($locales as $locale){
30		$variants_arr = ut_loc_locale_get_all_variants( $locale);
31		$res_str .= "$locale : variants ";
32		if( $variants_arr){
33			foreach($variants_arr as $variant){
34				$res_str .= "'$variant',";
35			}
36		}else{
37			$res_str .= "--none";
38		}
39		$res_str .= "\n";
40	}
41
42	$res_str .= "\n";
43    return $res_str;
44
45}
46
47include_once( 'ut_common.inc' );
48ut_run();
49
50?>
51--EXPECT--
52sl_IT_nedis_KIRTI : variants 'NEDIS','KIRTI',
53sl_IT_nedis-a-kirti-x-xyz : variants 'NEDIS',
54sl_IT_rozaj : variants 'ROZAJ',
55sl_IT_NEDIS_ROJAZ_1901 : variants 'NEDIS','ROJAZ','1901',
56i-enochian : variants --none
57zh-hakka : variants --none
58zh-wuu : variants --none
59i-tay : variants --none
60sgn-BE-nl : variants --none
61sgn-CH-de : variants --none
62sl_IT_rozaj@currency=EUR : variants 'ROZAJ',
63