def test_fixed_width_file_name_with_none_filename_return_empty_string( self): test = cli.fixed_width_file_name(None, 25) expected = '' assert expected == test
def test_fixed_width_file_name_with_file_name_at_max_length_is_not_shortened( self): test = cli.fixed_width_file_name('01234567890123456789012.c', 25) expected = '01234567890123456789012.c' assert expected == test
def test_fixed_width_file_name_with_file_name_smaller_than_max_length_not_shortened( self): test = cli.fixed_width_file_name('0123456789012345678901.c', 25) expected = '0123456789012345678901.c' assert expected == test
def test_fixed_width_file_name_with_file_name_smaller_than_max_length_is_not_shortened(self): file_name = '0123456789012345678901234.c' test = cli.fixed_width_file_name(file_name, max_length=50) assert file_name == test
def test_fixed_width_file_name_with_file_name_smaller_than_max_length_is_not_shortened( self): file_name = '0123456789012345678901234.c' test = cli.fixed_width_file_name(file_name, max_length=50) assert file_name == test
def test_fixed_width_file_name_with_posix_path_with_shortening(self): test = cli.fixed_width_file_name( 'C/Documents_and_Settings/Boki/Desktop/head/patches/drupal6/012345678901234567890123.c', 25) expected = '0123456789...4567890123.c' assert expected == test
def test_fixed_width_file_name_with_win_path_with_shortening(self): test = cli.fixed_width_file_name( 'C\\:Documents_and_Settings\\Boki\\Desktop\\head\\patches\\drupal6\\012345678901234567890123.c', 25) expected = '0123456789...4567890123.c' assert expected == test
def test_fixed_width_file_name_with_posix_path_with_shortening(self): test = cli.fixed_width_file_name('C/Documents_and_Settings/Boki/Desktop/head/patches/drupal6/012345678901234567890123.c', 25) expected = '0123456789...4567890123.c' assert expected == test
def test_fixed_width_file_name_with_win_path_without_shortening(self): test = cli.fixed_width_file_name('C\\:Documents_and_Settings\\Boki\\Desktop\\head\\patches\\drupal6\\drupal.js', 25) expected = 'drupal.js' assert expected == test
def test_fixed_width_file_name_without_extension(self): test = cli.fixed_width_file_name('012345678901234567890123456', 25) expected = '01234567890...67890123456' assert expected == test
def test_fixed_width_file_name_with_posix_path_without_shortening(self): test = cli.fixed_width_file_name('C/Documents_and_Settings/Boki/Desktop/head/patches/drupal6/drupal.js', 25) expected = 'drupal.js' assert expected == test
def test_fixed_width_file_name_with_none_filename_return_empty_string(self): test = cli.fixed_width_file_name(None, 25) expected = '' assert expected == test
def test_fixed_width_file_name_with_file_name_smaller_than_max_length_not_shortened(self): test = cli.fixed_width_file_name('0123456789012345678901.c', 25) expected = '0123456789012345678901.c' assert expected == test
def test_fixed_width_file_name_with_file_name_at_max_length_is_not_shortened(self): test = cli.fixed_width_file_name('01234567890123456789012.c', 25) expected = '01234567890123456789012.c' assert expected == test
def test_fixed_width_file_name_with_win_path_with_shortening(self): test = cli.fixed_width_file_name('C\\:Documents_and_Settings\\Boki\\Desktop\\head\\patches\\drupal6\\012345678901234567890123.c', 25) expected = '0123456789...4567890123.c' assert expected == test
def test_fixed_width_file_name_with_posix_path_without_shortening(self): test = cli.fixed_width_file_name( 'C/Documents_and_Settings/Boki/Desktop/head/patches/drupal6/drupal.js', 25) expected = 'drupal.js' assert expected == test
def test_fixed_width_file_name_with_very_small_file_name_and_long_extension(self): test = cli.fixed_width_file_name('abc.abcdef', 5) # FIXME: what is expected is TBD expected = '' assert expected == test
def test_fixed_width_file_name_with_win_path_without_shortening(self): test = cli.fixed_width_file_name( 'C\\:Documents_and_Settings\\Boki\\Desktop\\head\\patches\\drupal6\\drupal.js', 25) expected = 'drupal.js' assert expected == test
def test_fixed_width_file_name_with_file_name_larger_than_max_length_is_shortened( self): test = cli.fixed_width_file_name('0123456789012345678901234.c', 25) expected = '0123456789...5678901234.c' assert expected == test
def test_fixed_width_file_name_with_very_small_file_name_and_long_extension( self): test = cli.fixed_width_file_name('abc.abcdef', 5) # FIXME: what is expected is TBD expected = '' assert expected == test
def test_fixed_width_file_name_with_file_name_larger_than_max_length_is_shortened(self): test = cli.fixed_width_file_name('0123456789012345678901234.c', 25) expected = '0123456789...5678901234.c' assert expected == test