2013-02-07 17:26:39 -08:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
|
|
|
zci answer_type => 'rubiks_cube';
|
|
|
|
|
|
|
|
ddg_goodie_test(
|
|
|
|
[qw(
|
|
|
|
DDG::Goodie::RubiksCubePatterns
|
|
|
|
)],
|
2013-10-31 14:56:04 -07:00
|
|
|
'rubics cube stripes' => test_zci(
|
2013-11-22 06:57:59 -08:00
|
|
|
"Stripes: F U F R L2 B D' R D2 L D' B R2 L F U F \n",
|
|
|
|
"html" => "<div><i>Stripes</i>: F U F R L2 B D' R D2 L D' B R2 L F U F</div>\n"
|
2013-10-31 14:56:04 -07:00
|
|
|
),
|
|
|
|
'rubiks cube cube in a cube' => test_zci(
|
2013-11-22 06:57:59 -08:00
|
|
|
"Cube in a Cube: F L F U' R U F2 L2 U' L' B D' B' L2 U \n",
|
|
|
|
"html" => "<div><i>Cube in a Cube</i>: F L F U' R U F2 L2 U' L' B D' B' L2 U</div>\n"
|
2013-10-31 14:56:04 -07:00
|
|
|
),
|
|
|
|
'rubic cube swap centers' => test_zci(
|
2013-11-22 06:57:59 -08:00
|
|
|
"Swap Centers: U D' R L' F B' U D' \n",
|
|
|
|
"html" => "<div><i>Swap Centers</i>: U D' R L' F B' U D'</div>\n"
|
2013-11-01 06:42:12 -07:00
|
|
|
),
|
|
|
|
'rubiks cube in a cube' => test_zci(
|
2013-11-22 06:57:59 -08:00
|
|
|
"Cube in a Cube: F L F U' R U F2 L2 U' L' B D' B' L2 U \n",
|
|
|
|
"html" => "<div><i>Cube in a Cube</i>: F L F U' R U F2 L2 U' L' B D' B' L2 U</div>\n"
|
2013-11-01 06:42:12 -07:00
|
|
|
),
|
|
|
|
'rubiks cube in a cube in a cube' => test_zci(
|
2013-11-22 06:57:59 -08:00
|
|
|
"Cube in a Cube in a Cube: U' L' U' F' R2 B' R F U B2 U B' L U' F U R F' \n",
|
|
|
|
"html" => "<div><i>Cube in a Cube in a Cube</i>: U' L' U' F' R2 B' R F U B2 U B' L U' F U R F'</div>\n"
|
2013-11-01 06:42:12 -07:00
|
|
|
),
|
2013-11-22 07:13:40 -08:00
|
|
|
"rubik's cube patterns" => test_zci(
|
|
|
|
qr/.+: .+/s,
|
|
|
|
"html" => qr{<div><i>.+</i>: .+</div>}s,
|
|
|
|
"heading" => "Rubik's Cube Patterns"
|
|
|
|
),
|
2014-02-10 13:24:52 -08:00
|
|
|
'rcube stripes' => test_zci(
|
|
|
|
"Stripes: F U F R L2 B D' R D2 L D' B R2 L F U F \n",
|
|
|
|
html => "<div><i>Stripes</i>: F U F R L2 B D' R D2 L D' B R2 L F U F</div>\n",
|
|
|
|
),
|
|
|
|
'rcube cube in a cube' => test_zci(
|
|
|
|
"Cube in a Cube: F L F U' R U F2 L2 U' L' B D' B' L2 U \n",
|
|
|
|
html => "<div><i>Cube in a Cube</i>: F L F U' R U F2 L2 U' L' B D' B' L2 U</div>\n",
|
|
|
|
),
|
|
|
|
'rcube swap centers' => test_zci(
|
|
|
|
"Swap Centers: U D' R L' F B' U D' \n",
|
|
|
|
html => "<div><i>Swap Centers</i>: U D' R L' F B' U D'</div>\n",
|
|
|
|
),
|
2013-02-07 17:26:39 -08:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|