texqc 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/bin/texqc +3 -2
- data/features/cli.feature +10 -0
- data/features/step_definitions/steps.rb +1 -1
- data/texqc.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30419cd7f14c0b3656505a91662d1659e382212b63bef076b4493008838dced0
|
|
4
|
+
data.tar.gz: 7f1be6b8675e760a248750febab2ee595aed0a4748d93ceab4bcab888ce21f27
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bff8d66ad56903a940dc049c98768dce7432231421f4c04740d993ec8701653f63aebbfb939f9230799a2580faf5fef70dd1a6757101690c454812fcf69ecef4
|
|
7
|
+
data.tar.gz: 1ea0c923034d45f385efebaaa11a068309ef4a7d414d5c702325df4bdf89b6bfbaf801c489dc52e1f2d3022dc255bcc9f8b65b19812ddb5337b2051dcef23da4
|
data/bin/texqc
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# SPDX-FileCopyrightText: Copyright (c) 2020-2026 Yegor Bugayenko
|
|
5
5
|
# SPDX-License-Identifier: MIT
|
|
6
6
|
|
|
7
|
-
VERSION = '0.9.
|
|
7
|
+
VERSION = '0.9.1'
|
|
8
8
|
|
|
9
9
|
$stdout.sync = true
|
|
10
10
|
|
|
@@ -85,8 +85,9 @@ begin
|
|
|
85
85
|
/^Package \S+ Warning: /,
|
|
86
86
|
/^LaTeX Font Warning: /
|
|
87
87
|
]
|
|
88
|
-
File.open(f) do |io|
|
|
88
|
+
File.open(f, 'rb') do |io|
|
|
89
89
|
io.each_line.with_index do |t, i|
|
|
90
|
+
t = t.force_encoding('UTF-8').scrub
|
|
90
91
|
matches.each do |p|
|
|
91
92
|
next unless p.match?(t)
|
|
92
93
|
next if opts[:ignore].any? { |re| /.*#{re}.*/.match?(t) }
|
data/features/cli.feature
CHANGED
|
@@ -73,3 +73,13 @@ Feature: Command Line Processing
|
|
|
73
73
|
"""
|
|
74
74
|
Then I run bin/texqc with "article"
|
|
75
75
|
Then Exit code is zero
|
|
76
|
+
|
|
77
|
+
Scenario: A log with invalid UTF-8 bytes is processed without crashing
|
|
78
|
+
Given I have a "article.log" file with content:
|
|
79
|
+
"""
|
|
80
|
+
Some unrelated line with a bad byte: \xFF here
|
|
81
|
+
LaTeX Warning: Label `xxx' multiply defined.
|
|
82
|
+
"""
|
|
83
|
+
Then I run bin/texqc with "article"
|
|
84
|
+
Then Exit code is not zero
|
|
85
|
+
And Stdout contains "1 LaTeX processing errors"
|
|
@@ -20,7 +20,7 @@ end
|
|
|
20
20
|
|
|
21
21
|
Given(/^I have a "([^"]*)" file with content:$/) do |file, text|
|
|
22
22
|
FileUtils.mkdir_p(File.dirname(file)) unless File.exist?(file)
|
|
23
|
-
File.
|
|
23
|
+
File.binwrite(file, text.gsub('\\xFF', 0xFF.chr))
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
When(%r{^I run bin/texqc with "([^"]*)"$}) do |arg|
|
data/texqc.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to?(:required_rubygems_version=)
|
|
12
12
|
s.required_ruby_version = '>= 3.3'
|
|
13
13
|
s.name = 'texqc'
|
|
14
|
-
s.version = '0.9.
|
|
14
|
+
s.version = '0.9.1'
|
|
15
15
|
s.license = 'MIT'
|
|
16
16
|
s.summary = 'Quality Control of Your LaTeX Build'
|
|
17
17
|
s.description = 'Run it after you compile your LaTeX document'
|