Skip to content

Commit

Permalink
Added: base-convert built-in function
Browse files Browse the repository at this point in the history
Added: base-convert test cases
  • Loading branch information
mythril committed Jun 7, 2012
1 parent e264579 commit 64caaf8
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/cases/bifs.base-convert.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#test {
make-rrggbb: #ccaabb;
}
#test2 {
foo: 10;
foo: 11;
foo: 12;
foo: 13;
foo: 14;
foo: 15;
foo: 16;
foo: 17;
foo: 20;
foo: 22;
}
#test3 {
bar: 1;
bar: 01;
bar: 001;
bar: 0001;
}
21 changes: 21 additions & 0 deletions test/cases/bifs.base-convert.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#test
make-rrggbb: s('#%s%s%s', base-convert(red(#ccaabb), 16), base-convert(green(#ccaabb), 16), base-convert(blue(#ccaabb), 16))

#test2
foo: base-convert(16, 16)
foo: base-convert(16, 15)
foo: base-convert(16, 14)
foo: base-convert(16, 13)
foo: base-convert(16, 12)
foo: base-convert(16, 11)
foo: base-convert(16, 10)
foo: base-convert(16, 9)
foo: base-convert(16, 8)
foo: base-convert(16, 7)

#test3
bar: base-convert(1, 10, 1);
bar: base-convert(1, 10, 2);
bar: base-convert(1, 10, 3);
bar: base-convert(1, 10, 4);

0 comments on commit 64caaf8

Please sign in to comment.