⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.177
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
.cpan
/
build
/
YAML-LibYAML-0.89-0
/
t
/
View File Name :
file.t
use FindBin '$Bin'; use lib $Bin; use TestYAML tests => 7; use YAML::XS qw'LoadFile'; ok exists &LoadFile, 'LoadFile is imported'; ok not(exists &DumpFile), 'DumpFile is not imported'; ok not(exists &Dump), 'Dump is not imported'; rmtree('t/output'); mkdir('t/output'); my $test_file = 't/output/test.yaml'; ok not(-f $test_file), 'YAML output file does not exist yet'; my $t1 = {foo => [1..4]}; my $t2 = 'howdy ho'; YAML::XS::DumpFile($test_file, $t1, $t2); ok -f $test_file, 'YAML output file exists'; my ($t1_, $t2_) = LoadFile($test_file); is_deeply [$t1_, $t2_], [$t1, $t2], 'File roundtrip ok'; my $t3 = {"foo\x{123}" => [1..4]}; my $t4 = "howdy ho \x{5050}"; YAML::XS::DumpFile($test_file, $t3, $t4); my ($t3_, $t4_) = LoadFile($test_file); is_deeply [$t3_, $t4_], [$t3, $t4], 'Unicode roundtrip ok';