1# -*- perl -*-
2
3use strict;
4use Set::IntSpan 1.17;
5
6my $N = 1;
7sub Not { print "not " }
8sub OK  { print "ok ", $N++, "\n" }
9
10print "1..3\n";
11print "#set specification\n";
12
13my $set = new Set::IntSpan;
14my $run_list = run_list $set;
15print "#set spec: new Set::IntSpan -> $run_list\n";
16empty $set or Not; OK;
17
18my $set_1 = new Set::IntSpan "1-5";
19my $set_2 = new Set::IntSpan $set_1;
20my $set_3 = new Set::IntSpan [1, 2, 3, 4, 5];
21
22my $run_list_1 = run_list $set_1;
23my $run_list_2 = run_list $set_2;
24my $run_list_3 = run_list $set_3;
25
26print "#set_spec: $run_list_1 -> $run_list_2\n";
27$set_1->equal($set_2) or Not; OK;
28
29print "#set_spec: [1, 2, 3, 4, 5] -> $run_list_3\n";
30$set_1->equal($set_3) or Not; OK;
31