File indexing completed on 2024-12-22 04:28:07
0001 /* 0002 SPDX-FileCopyrightText: 2014-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <KSharedConfig> 0010 #include <QObject> 0011 class AutoCorrectionTest : public QObject 0012 { 0013 Q_OBJECT 0014 public: 0015 AutoCorrectionTest(); 0016 ~AutoCorrectionTest() override; 0017 0018 private Q_SLOTS: 0019 void shouldHaveDefaultValue(); 0020 void shouldRestoreValue(); 0021 void shouldUpperCaseFirstCharOfSentence(); 0022 void shouldFixTwoUpperCaseChars(); 0023 void shouldReplaceSingleQuote(); 0024 void shouldReplaceDoubleQuote(); 0025 void shouldNotReplaceUppercaseLetter(); 0026 void shouldReplaceToTextFormat(); 0027 void shouldReplaceAutoFraction(); 0028 void shouldNotAddSpaceWhenWeAlreadyHaveASpace(); 0029 void shouldAutocorrectWord(); 0030 void shouldNotUpperCaseFirstCharOfSentence(); 0031 0032 void shouldAutocorrectMultiWord_data(); 0033 void shouldAutocorrectMultiWord(); 0034 0035 void shouldAddNonBreakingSpace_data(); 0036 void shouldAddNonBreakingSpace(); 0037 0038 void shouldReplaceWithMultiOption_data(); 0039 void shouldReplaceWithMultiOption(); 0040 0041 void shouldAddNonBreakingSpaceBeforeAfterQuote(); 0042 0043 void shouldAutoFormatURLs(); 0044 0045 private: 0046 KSharedConfig::Ptr mConfig; 0047 };