Implementation of Unlambda, an esoteric programming language.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
u6a/tests/default/quines.exp

38 lines
1.0 KiB

#
# Copyright (C) 2020 CismonX <admin@cismon.net>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty, provided the copyright notice and
# this notice are preserved. This file is offered as-is, without any warranty.
#
set tool "default"
set timeout 20
puts "Downloading files..."
exec wget --quiet "ftp://ftp.madore.org/pub/madore/unlambda/unlambda-2.0.0.tar.gz"
puts "Extracting archive..."
exec tar -zxvf "unlambda-2.0.0.tar.gz" >& /dev/null
set pwd [ pwd ]
set quines [ glob -directory "$pwd/unlambda-2.0.0/CUAN/quine/" "*.unl" ]
foreach filename $quines {
set fp [ open $filename r ]
set data [ read $fp ]
close $fp
u6a_run "$filename" - "-p5000000" 0
match_max [ string length $data ]
expect {
-ex "$data" {
pass "$filename ok!"
}
default {
fail "$filename fails!"
}
}
u6a_stop 0
}
puts "Cleaning up..."
file delete "$pwd/unlambda-2.0.0.tar.gz"
file delete -force "$pwd/unlambda-2.0.0"