barcode1dtools 0.9.9.1 → 0.9.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,11 +116,6 @@ module Barcode1DTools
|
|
116
116
|
# intra-digit guard pattern, and "dddd" is the second
|
117
117
|
# digit.
|
118
118
|
|
119
|
-
# See if the string is reversed
|
120
|
-
if str[10..12] == LEFT_GUARD_PATTERN_RLE.reverse && str[4..5] == MIDDLE_GUARD_PATTERN_RLE.reverse
|
121
|
-
str.reverse!
|
122
|
-
end
|
123
|
-
|
124
119
|
# Check the guard patterns
|
125
120
|
unless (str[0..2] == LEFT_GUARD_PATTERN_RLE && str[7..8] == MIDDLE_GUARD_PATTERN_RLE)
|
126
121
|
raise UnencodableCharactersError, "Missing or incorrect guard patterns"
|
@@ -82,8 +82,5 @@ class Barcode1DToolsUPC_Supp2Test < Test::Unit::TestCase
|
|
82
82
|
assert_equal upcsupp2.value, upcsupp22.value
|
83
83
|
upcsupp23 = Barcode1DTools::UPC_Supplemental_2.decode(upcsupp2.rle)
|
84
84
|
assert_equal upcsupp2.value, upcsupp23.value
|
85
|
-
# Should also work in reverse
|
86
|
-
upcsupp24 = Barcode1DTools::UPC_Supplemental_2.decode(upcsupp2.bars.reverse)
|
87
|
-
assert_equal upcsupp2.value, upcsupp24.value
|
88
85
|
end
|
89
86
|
end
|