File: modifiers.t

package info (click to toggle)
nqp 2016.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,960 kB
  • ctags: 3,884
  • sloc: java: 25,027; perl: 910; makefile: 12; sh: 2
file content (11 lines) | stat: -rw-r--r-- 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