File:  [parser3project] / parser3 / tests / results / auto.p
Revision 1.16: download - view: text, annotated - select for diffs - revision graph
Mon Nov 23 22:46:45 2020 UTC (5 years, 7 months ago) by moko
Branches: MAIN
CVS tags: HEAD
test for $response:body[ $.file[<file>] $.name[] ] added (related to bug #1204)

@conf[filespec]
$CHARSETS[
	$.windows-1251[../etc/parser3.charsets/windows-1251.cfg]
]

$CLASS_PATH[^table::create{path
/
/tests
}]

$NO_PROTOTYPE[
	$.[336.html][yes]
	$.[225.html][yes]
	$.[051.html][yes]
]

^if(def $NO_PROTOTYPE.[$env:PATH_TRANSLATED]){
	$OBJECT-PROTOTYPE(false)
}

^if($env:PATH_TRANSLATED eq '357.html'){
	$LIMITS[
		$.max_loop(50)
		$.max_recoursion(50)
	]
}
^if($env:PATH_TRANSLATED eq '358.html'){
	$LIMITS[
		$.max_loop(0)
		$.max_recoursion(0)
	]
}
^if($env:PATH_TRANSLATED eq '380.html' || $env:PATH_TRANSLATED eq '394-curl.html' ){
	$LIMITS[
		$.max_file_size(10000)
	]
}

^if($env:PATH_TRANSLATED eq '403.html'){
	$MIME-TYPES[^table::create{ext	mime-type
txt	text/plain
html	text/html
}]
}


@auto[]


@try-catch[jCode]
^try{$jCode}{
	$exception.handled(true)
	Type: $exception.type,
	Source: $exception.source,
	Comment: $exception.comment
}


@1251[]
^from-1251[]
^to-1251[]


@from-1251[]
$request:charset[windows-1251]


@to-1251[]
$response:charset[windows-1251]


# backward
@windows-1251[]
^1251[]

@os[win;unix][name]
$name[^env:OS.left(7)]
$result[^if(^name.lower[] eq 'windows'){$win}{$unix}]

E-mail: