File indexing completed on 2022-10-04 15:34:12

0001 /*
0002     SPDX-FileCopyrightText: 2011 Michal Malek <michalm@jabster.pl>
0003     SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #include "k3bglobalstest.h"
0009 #include "k3bglobals.h"
0010 
0011 #include <QTest>
0012 
0013 QTEST_GUILESS_MAIN( GlobalsTest )
0014 
0015 GlobalsTest::GlobalsTest()
0016 {
0017 }
0018 
0019 void GlobalsTest::testCutFilename()
0020 {
0021     QCOMPARE( K3b::cutFilename( "abcd.txt", 2 ), QString( ".txt" ) );
0022     QCOMPARE( K3b::cutFilename( "abcd.txt", 3 ), QString( ".txt" ) );
0023     QCOMPARE( K3b::cutFilename( "abcd.txt", 8 ), QString( "abcd.txt" ) );
0024 }
0025 
0026 void GlobalsTest::testRemoveFilenameExtension()
0027 {
0028     QCOMPARE( K3b::removeFilenameExtension( "abcd.txt" ), QString( "abcd" ) );
0029 }
0030 
0031