[前][次][番号順一覧][スレッド一覧]

ruby-changes:60570

From: David <ko1@a...>
Date: Mon, 30 Mar 2020 13:00:58 +0900 (JST)
Subject: [ruby-changes:60570] b34721aa04 (master): [rubygems/rubygems] Consistently left align tokenizer test columns

https://git.ruby-lang.org/ruby.git/commit/?id=b34721aa04

From b34721aa04e9de4e42c502b2a7ffe4f0a792d8d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Fri, 27 Mar 2020 13:47:50 +0100
Subject: [rubygems/rubygems] Consistently left align tokenizer test columns

Makes it easier to rubocop.

https://github.com/rubygems/rubygems/commit/26b31248ae

diff --git a/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb b/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb
index aa91fc4..b5bafe3 100644
--- a/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb
+++ b/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb
@@ -64,86 +64,86 @@ DEPENDENCIES https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb#L64
     LOCKFILE
 
     expected = [
-      [:section,     'GEM',                0,  0],
-      [:newline,     nil,                  3,  0],
-
-      [:entry,       'remote',             2,  1],
-      [:text,        @gem_repo,           10,  1],
-      [:newline,     nil,                 34,  1],
-
-      [:entry,       'specs',              2,  2],
-      [:newline,     nil,                  8,  2],
-
-      [:text,        'a',                  4,  3],
-      [:l_paren,     nil,                  6,  3],
-      [:text,        '2',                  7,  3],
-      [:r_paren,     nil,                  8,  3],
-      [:newline,     nil,                  9,  3],
-
-      [:text,        'b',                  6,  4],
-      [:l_paren,     nil,                  8,  4],
-      [:requirement, '=',                  9,  4],
-      [:text,        '2',                 11,  4],
-      [:r_paren,     nil,                 12,  4],
-      [:newline,     nil,                 13,  4],
-
-      [:text,        'c',                  6,  5],
-      [:l_paren,     nil,                  8,  5],
-      [:requirement, '!=',                 9,  5],
-      [:text,        '3',                 12,  5],
-      [:r_paren,     nil,                 13,  5],
-      [:newline,     nil,                 14,  5],
-
-      [:text,        'd',                  6,  6],
-      [:l_paren,     nil,                  8,  6],
-      [:requirement, '>',                  9,  6],
-      [:text,        '4',                 11,  6],
-      [:r_paren,     nil,                 12,  6],
-      [:newline,     nil,                 13,  6],
-
-      [:text,        'e',                  6,  7],
-      [:l_paren,     nil,                  8,  7],
-      [:requirement, '<',                  9,  7],
-      [:text,        '5',                 11,  7],
-      [:r_paren,     nil,                 12,  7],
-      [:newline,     nil,                 13,  7],
-
-      [:text,        'f',                  6,  8],
-      [:l_paren,     nil,                  8,  8],
-      [:requirement, '>=',                 9,  8],
-      [:text,        '6',                 12,  8],
-      [:r_paren,     nil,                 13,  8],
-      [:newline,     nil,                 14,  8],
-
-      [:text,        'g',                  6,  9],
-      [:l_paren,     nil,                  8,  9],
-      [:requirement, '<=',                 9,  9],
-      [:text,        '7',                 12,  9],
-      [:r_paren,     nil,                 13,  9],
-      [:newline,     nil,                 14,  9],
-
-      [:text,        'h',                  6, 10],
-      [:l_paren,     nil,                  8, 10],
-      [:requirement, '~>',                 9, 10],
+      [:section,     'GEM',               0,  0],
+      [:newline,     nil,                 3,  0],
+
+      [:entry,       'remote',            2,  1],
+      [:text,        @gem_repo,           10, 1],
+      [:newline,     nil,                 34, 1],
+
+      [:entry,       'specs',             2,  2],
+      [:newline,     nil,                 8,  2],
+
+      [:text,        'a',                 4,  3],
+      [:l_paren,     nil,                 6,  3],
+      [:text,        '2',                 7,  3],
+      [:r_paren,     nil,                 8,  3],
+      [:newline,     nil,                 9,  3],
+
+      [:text,        'b',                 6,  4],
+      [:l_paren,     nil,                 8,  4],
+      [:requirement, '=',                 9,  4],
+      [:text,        '2',                 11, 4],
+      [:r_paren,     nil,                 12, 4],
+      [:newline,     nil,                 13, 4],
+
+      [:text,        'c',                 6,  5],
+      [:l_paren,     nil,                 8,  5],
+      [:requirement, '!=',                9,  5],
+      [:text,        '3',                 12, 5],
+      [:r_paren,     nil,                 13, 5],
+      [:newline,     nil,                 14, 5],
+
+      [:text,        'd',                 6,  6],
+      [:l_paren,     nil,                 8,  6],
+      [:requirement, '>',                 9,  6],
+      [:text,        '4',                 11, 6],
+      [:r_paren,     nil,                 12, 6],
+      [:newline,     nil,                 13, 6],
+
+      [:text,        'e',                 6,  7],
+      [:l_paren,     nil,                 8,  7],
+      [:requirement, '<',                 9,  7],
+      [:text,        '5',                 11, 7],
+      [:r_paren,     nil,                 12, 7],
+      [:newline,     nil,                 13, 7],
+
+      [:text,        'f',                 6,  8],
+      [:l_paren,     nil,                 8,  8],
+      [:requirement, '>=',                9,  8],
+      [:text,        '6',                 12, 8],
+      [:r_paren,     nil,                 13, 8],
+      [:newline,     nil,                 14, 8],
+
+      [:text,        'g',                 6,  9],
+      [:l_paren,     nil,                 8,  9],
+      [:requirement, '<=',                9,  9],
+      [:text,        '7',                 12, 9],
+      [:r_paren,     nil,                 13, 9],
+      [:newline,     nil,                 14, 9],
+
+      [:text,        'h',                 6,  10],
+      [:l_paren,     nil,                 8,  10],
+      [:requirement, '~>',                9,  10],
       [:text,        '8',                 12, 10],
       [:r_paren,     nil,                 13, 10],
       [:newline,     nil,                 14, 10],
 
-      [:newline,     nil,                  0, 11],
+      [:newline,     nil,                 0,  11],
 
-      [:section,     'PLATFORMS',          0, 12],
-      [:newline,     nil,                  9, 12],
+      [:section,     'PLATFORMS',         0,  12],
+      [:newline,     nil,                 9,  12],
 
-      [:text,        Gem::Platform::RUBY,  2, 13],
-      [:newline,     nil,                  6, 13],
+      [:text,        Gem::Platform::RUBY, 2,  13],
+      [:newline,     nil,                 6,  13],
 
-      [:newline,     nil,                  0, 14],
+      [:newline,     nil,                 0,  14],
 
-      [:section,     'DEPENDENCIES',       0, 15],
+      [:section,     'DEPENDENCIES',      0,  15],
       [:newline,     nil,                 12, 15],
 
-      [:text,        'a',                  2, 16],
-      [:newline,     nil,                  3, 16],
+      [:text,        'a',                 2,  16],
+      [:newline,     nil,                 3,  16],
     ]
 
     assert_equal expected, tokenize_lockfile
@@ -164,28 +164,28 @@ DEPENDENCIES https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb#L164
     LOCKFILE
 
     expected = [
-      [:section, 'GEM',                0, 0],
-      [:newline, nil,                  3, 0],
-      [:entry,   'remote',             2, 1],
+      [:section, 'GEM',               0,  0],
+      [:newline, nil,                 3,  0],
+      [:entry,   'remote',            2,  1],
       [:text,    @gem_repo,           10, 1],
       [:newline, nil,                 34, 1],
-      [:entry,   'specs',              2, 2],
-      [:newline, nil,                  8, 2],
-      [:text,    'Ab',                 4, 3],
-      [:l_paren, nil,                  7, 3],
-      [:text,    '2',                  8, 3],
-      [:r_paren, nil,                  9, 3],
+      [:entry,   'specs',             2,  2],
+      [:newline, nil,                 8,  2],
+      [:text,    'Ab',                4,  3],
+      [:l_paren, nil,                 7,  3],
+      [:text,    '2',                 8,  3],
+      [:r_paren, nil,                 9,  3],
       [:newline, nil,                 10, 3],
-      [:newline, nil,                  0, 4],
-      [:section, 'PLATFORMS',          0, 5],
-      [:newline, nil,                  9, 5],
-      [:text,    Gem::Platform::RUBY,  2, 6],
-      [:newline, nil,                  6, 6],
-      [:newline, nil,                  0, 7],
-      [:section, 'DEPENDENCIES',       0, 8],
+      [:newline, nil,                 0,  4],
+      [:section, 'PLATFORMS',         0,  5],
+      [:newline, nil,                 9,  5],
+      [:text,    Gem::Platform::RUBY, 2,  6],
+      [:newline, nil,                 6,  6],
+      [:newline, nil,                 0,  7],
+      [:section, 'DEPENDENCIES',      0,  8],
       [:newline, nil,                 12, 8],
-      [:text,    'Ab',                 2, 9],
-      [:newline, nil,                  4, 9],
+      [:text,    'Ab',                2,  9],
+      [:newline, nil,                 4,  9],
     ]
 
     assert_equal expected, tokenize_lockfile
@@ -236,12 +236,12 @@ DEPENDENCIES https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb#L236
     LOCKFILE
 
     expected = [
-      [:section, 'DEPENDENCIES',  0,  0],
-      [:newline, nil,            12,  0],
+      [:section, 'DEPENDENCIES', 0,  0],
+      [:newline, nil,            12, 0],
 
-      [:text,    'a',             2,  1],
-      [:bang,    nil,             3,  1],
-      [:newline, nil,             4,  1],
+      [:text,    'a',            2,  1],
+      [:bang,    nil,            3,  1],
+      [:newline, nil,            4, (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]