# escape.test --
#
# Tests URL escaping and unescaping helpers.
#
# Copyright (c) 2024-2026 Massimo Manghi
#
# SPDX-License-Identifier: TCL
#
# See the file "license.terms" at the top level of this distribution
# for information on usage and redistribution of this file, and for the
# complete disclaimer of warranties and limitation of liability.
#
# Portions of this file were drafted or revised with AI assistance
# under the direction and review of Massimo Manghi

package require tcltest
namespace import ::tcltest::*

source [file join [file dirname [file normalize [info script]]] support.tcl]
::tclcurl::test::load_package

package require TclCurl

test 1.01 {: Test escape} -body {
	set escaped [curl::escape {What about this?}]
	return $escaped
} -result {What%20about%20this%3F}

test 1.02 {: Test unescape} -body {
	return [curl::unescape $escaped]
} -result {What about this?}


cleanupTests

