#!/usr/bin/env perl use strict; use warnings; use Test::More; use DDG::Test::Goodie; zci answer_type => 'rubiks_cube'; zci is_cached => 1; ddg_goodie_test( [qw( DDG::Goodie::RubiksCubePatterns )], 'rubics cube stripes' => test_zci( "Stripes: F U F R L2 B D' R D2 L D' B R2 L F U F \n", "html" => "
Stripes: F U F R L2 B D' R D2 L D' B R2 L F U F
\n" ), 'rubiks cube 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" => "
Cube in a Cube: F L F U' R U F2 L2 U' L' B D' B' L2 U
\n" ), 'rubic cube swap centers' => test_zci( "Swap Centers: U D' R L' F B' U D' \n", "html" => "
Swap Centers: U D' R L' F B' U D'
\n" ), 'rubiks 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" => "
Cube in a Cube: F L F U' R U F2 L2 U' L' B D' B' L2 U
\n" ), 'rubiks cube in a cube in a cube' => test_zci( "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" => "
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" ), "rubik's cube patterns" => test_zci( qr/.+: .+/s, "html" => qr{
.+: .+
}s, "heading" => "Rubik's Cube Patterns" ), 'rcube stripes' => test_zci( "Stripes: F U F R L2 B D' R D2 L D' B R2 L F U F \n", html => "
Stripes: F U F R L2 B D' R D2 L D' B R2 L F U F
\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 => "
Cube in a Cube: F L F U' R U F2 L2 U' L' B D' B' L2 U
\n", ), 'rcube swap centers' => test_zci( "Swap Centers: U D' R L' F B' U D' \n", html => "
Swap Centers: U D' R L' F B' U D'
\n", ), ); done_testing;