File: modifiers.t

package info (click to toggle)
nqp 2014.07-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,596 kB
  • ctags: 7,993
  • sloc: ansic: 22,689; java: 20,240; cpp: 4,956; asm: 3,976; perl: 950; python: 267; sh: 245; makefile: 14
file content (11 lines) | stat: -rwxr-xr-x 389 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
puts "1..10"
n=0
puts "ok #{n+=1} - if modifier" if true
puts "nok #{n+=1} - if modifier" if false
puts "ok #{n+=1} - unless modifier" unless false
puts "nok #{n+=1} - unless modifier" unless true
puts "ok #{n+=1} - until modifier" until n >= 6
puts "ok #{n+=1} - while modifier" while n < 8
begin
    puts "ok #{n+=1} - while modifier - begin .. end block" while n < 10
end until n >= 10