git @ Cat's Eye Technologies Velo / 457d98f
Add stuff so that we can at least run the README as a test suite. Cat's Eye Technologies 12 years ago
4 changed file(s) with 23 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1111 Falderal format. The design of Velo is still somewhat inchoate,
1212 so do not expect all of these examples to be perfectly consistent
1313 or even necessarily feasible.
14
15 -> Tests for functionality "Interpret Velo Script"
1416
1517 First, the ubiquitous "Hello, world!":
1618
5860 that you necessarily take a performance hit.
5961
6062 | extend {IO}
61 | a = input;
63 | a = {7}.concat {>}.concat {5}
6264 | a.if {print {Yes}}, {print {No}}
63 + 5 > 4
6465 = Yes
6566
6667 Scripts as Classes
0 #!/usr/bin/env ruby
1
2 # This is just a stub that always fails for now, so that we can at least
3 # run the tests defined in the README.
4
5 # (Part of me is also thinking it's a bad idea to try to implement Velo
6 # in Ruby, but for now, why not.)
7
8 ARGV.each do |filename|
9 end
10
11 $stderr.puts "I fail"
12 exit false
0 #!/bin/sh
1
2 falderal test tests/config/Velo.markdown README.markdown
0 Testing Velo scripts on Velo reference interpreter
1
2 -> Functionality "Interpret Velo Script" is implemented by shell command
3 -> "src/velo.rb %(test-file)"