-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enhancement] Support for extensions
- Loading branch information
Showing
4 changed files
with
170 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require File.dirname(__FILE__) + '/test_helper' | ||
|
||
class ExtensionTest < Test::Unit::TestCase | ||
|
||
def test_parse_usa_long_with_simple_extension | ||
pn = Phone.parse "+1 2069735100 x143" | ||
|
||
assert_not_nil pn, %Q{parse should pass} | ||
assert_equal '9735100', pn.number | ||
assert_equal '206', pn.area_code | ||
assert_equal '1', pn.country_code | ||
assert_equal '143', pn.extension | ||
end | ||
|
||
def test_to_s_with_extension | ||
pn = Phone.new '5125486', '91', '385', '143' | ||
assert_equal '+385915125486x143', pn.format(:default_with_extension) | ||
end | ||
|
||
def test_format_with_extension | ||
pn = Phone.new '5125486', '91', '385', '143' | ||
assert_equal '(091)/512-5486 x 143', pn.format('(%A)/%f-%l x %x') | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
601-867-5000 ext 75292 | ||
(334)821-2223 Ext. 107 | ||
(863) 983-6171 ext: 0055 | ||
601-987-3995 ext 10 | ||
(512) 473-3200Ext2396 | ||
(727) 558-5010 ext: 0112 | ||
(904) 360-5611 ext: 5611 | ||
(937) 255-7204Ext337 | ||
228-374-5022 ext 5386 | ||
(205)987-3500 Ext. 205-32 | ||
(607) 273-8588x402 | ||
(205)328-3330 Ext. 802-59 | ||
(407) 251-2452 ext: 0146 | ||
502-564-8110 xt 312 | ||
(828) 698-3923x13 | ||
(608)836-7433 Ext. 5147 | ||
(1-808)935-3222 Ext. 2# | ||
(770)420-3179 Ext. x 179 | ||
(415) 558-8669x218 | ||
(205)879-6330 Ext. 731-50 | ||
(205)987-5995 Ext. 802-58 | ||
(609) 924-2200Ext10 | ||
(312) 440-4373x12 | ||
(978) 369-9602x457 | ||
1-602-264-1774 # 135 | ||
502-564-8890 x4340 | ||
502-564-5550 x4569 | ||
(480)437-2600 Ext. VM123 | ||
(850) 245-4131 ext: 3506 | ||
601-354-6161 ext 103 | ||
(414)778-5400 Ext. 127 | ||
(262)338-4475 Ext. #16 | ||
(602) 264-1774 extention # 135 | ||
(314) 361-3221x107 | ||
(800) 255-5747x46 | ||
410-514-7336 TDDTTY + Voice | ||
(617) 695-2300x393 | ||
1-334-386-8800 Ext. 107 | ||
(928)634-9536 Ext. 143 | ||
502-573-1555 x266 | ||
(978) 927-8000x246 | ||
(920) 887-4600Ext340 | ||
502-564-1404 x4536 | ||
(850) 245-6774 ext: 4774 | ||
(718) 852-3000 Ext 269 | ||
228-374-5022 ext 5022 | ||
502-564-0105 x10260 | ||
(850) 000-0000 ext: 00000000 | ||
(979) 233-1616x306 | ||
(207) 333-3267x224 | ||
(561) 625-5122 ext: 687 | ||
(386) 961-7414 ext: 7414 | ||
(262)549-2249 Ext. 104 | ||
(205)322-7500 Ext. BECKYS | ||
(303)858-8100 Ext. n.a. | ||
(937) 255-7204x337 | ||
601-944-4830 ext 104 | ||
228-432-1056 ext 104 | ||
(209) 586-1495Ext104 | ||
502-564-8139 : 4645 | ||
(602) 264-1774 ext is 135 | ||
(602) 264-1774Ext135 | ||
502-564-7822 x4212 | ||
(609) 921-8808Ext3 | ||
(703) 739-7900x222 | ||
(609) 758-2241x144 | ||
(970)223-6500 Ext. X6510 | ||
(734) 485-2000Ext255 | ||
(904) 620-4424 ext: 8614424 | ||
(904) 827-2520 ext: 2520 | ||
(978) 774-1050x251 | ||
(541) 343-0123x2269 | ||
(608)277-2752 Ext. 2752 | ||
(203) 869-6786x335 | ||
502-564-5981 x272 | ||
606-878-5908 x6085 | ||
502-564-2257 x3464 | ||
(205)871-1911 Ext. (205) | ||
502-564-7770 x3965 | ||
(608)374-2130 Ext. 28 | ||
(850) 410-9660 ext: 9240 | ||
601-987-6837 ext 102 | ||
(414)529-1101 Ext. 153 | ||
(209) 586-1495x104 | ||
(520)408-1885 Ext. # 227 | ||
601-605-5388 ext 100 | ||
(352) 375-8484 ext: 0174 | ||
15025645981x225 | ||
(602) 264-1774 X 135 | ||
(205)803-1499 Ext. 414-03 | ||
(651) 459-4121x203 | ||
+61 3 9811 2400 | ||
(262)681-2020 Ext. 6682 | ||
601-944-4845 ext 118 | ||
384-1100 VOICE MAIL:3004 | ||
(205)251-1267 Ext. 802-09 | ||
(410) 280-2038Ext11 | ||
502-564-3170 x190 | ||
15025646734x4420 |