@@ -93,10 +93,10 @@ namespace {
93
93
94
94
fs::path copySampleFile (const std::string &src, fs::path target, chrono::seconds delta)
95
95
{
96
- fs::path file { fs::path (" samples" ) / src };
96
+ fs::path file {fs::path (" samples" ) / src};
97
97
return copyFile (file, target, delta);
98
98
}
99
-
99
+
100
100
fs::path copyFile (const fs::path src, fs::path target, chrono::seconds delta)
101
101
{
102
102
fs::path file {fs::path (TEST_RESOURCE_DIR) / src};
@@ -109,7 +109,6 @@ namespace {
109
109
return target;
110
110
}
111
111
112
-
113
112
void replaceTextInFile (fs::path file, const std::string &from, const std::string &to)
114
113
{
115
114
ifstream is {file.string (), ios::binary | ios::ate};
@@ -2304,17 +2303,17 @@ Adapters {
2304
2303
ASSERT_TRUE (dev);
2305
2304
ASSERT_EQ (" NEW-UUID" , *(dev->getUuid ()));
2306
2305
}
2307
-
2306
+
2308
2307
TEST_F (ConfigTest, should_update_stylesheet_versions)
2309
2308
{
2310
2309
fs::path root {createTempDirectory (" 14" )};
2311
2310
2312
- fs::path styleDir { root / " styles" };
2311
+ fs::path styleDir {root / " styles" };
2313
2312
fs::create_directory (styleDir);
2314
-
2315
- fs::path styles { styleDir / " styles.xsl" };
2313
+
2314
+ fs::path styles {styleDir / " styles.xsl" };
2316
2315
copyFile (" styles/styles.xsl" , styles, 0min);
2317
-
2316
+
2318
2317
fs::path devices (root / " Devices.xml" );
2319
2318
copySampleFile (" empty.xml" , devices, 0min);
2320
2319
@@ -2334,7 +2333,6 @@ Files {
2334
2333
}
2335
2334
DevicesStyle { Location = /styles/styles.xsl }
2336
2335
)DOC" ;
2337
-
2338
2336
}
2339
2337
2340
2338
boost::program_options::variables_map options;
@@ -2345,10 +2343,10 @@ DevicesStyle { Location = /styles/styles.xsl }
2345
2343
2346
2344
ifstream file (styles);
2347
2345
ASSERT_TRUE (file.is_open ());
2348
-
2346
+
2349
2347
stringstream sf;
2350
2348
sf << file.rdbuf ();
2351
-
2349
+
2352
2350
ASSERT_EQ (R"DOC( <?xml version="1.0" encoding="UTF-8"?>
2353
2351
<xsl:stylesheet version="1.0"
2354
2352
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -2367,21 +2365,22 @@ DevicesStyle { Location = /styles/styles.xsl }
2367
2365
<xsl:template match="/">
2368
2366
</xsl:template>
2369
2367
</xsl:stylesheet>
2370
- )DOC" , sf.str ());
2371
-
2368
+ )DOC" ,
2369
+ sf.str ());
2370
+
2372
2371
m_config->stop ();
2373
2372
}
2374
-
2373
+
2375
2374
TEST_F (ConfigTest, should_update_stylesheet_versions_with_path)
2376
2375
{
2377
2376
fs::path root {createTempDirectory (" 15" )};
2378
2377
2379
- fs::path styleDir { root / " styles" };
2378
+ fs::path styleDir {root / " styles" };
2380
2379
fs::create_directory (styleDir);
2381
-
2382
- fs::path styles { styleDir / " styles.xsl" };
2380
+
2381
+ fs::path styles {styleDir / " styles.xsl" };
2383
2382
copyFile (" styles/styles.xsl" , styles, 0min);
2384
-
2383
+
2385
2384
fs::path devices (root / " Devices.xml" );
2386
2385
copySampleFile (" empty.xml" , devices, 0min);
2387
2386
@@ -2398,7 +2397,6 @@ DevicesStyle {
2398
2397
Path = ./styles/styles.xsl
2399
2398
}
2400
2399
)DOC" ;
2401
-
2402
2400
}
2403
2401
2404
2402
boost::program_options::variables_map options;
@@ -2409,10 +2407,10 @@ DevicesStyle {
2409
2407
2410
2408
ifstream file (styles);
2411
2409
ASSERT_TRUE (file.is_open ());
2412
-
2410
+
2413
2411
stringstream sf;
2414
2412
sf << file.rdbuf ();
2415
-
2413
+
2416
2414
ASSERT_EQ (R"DOC( <?xml version="1.0" encoding="UTF-8"?>
2417
2415
<xsl:stylesheet version="1.0"
2418
2416
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -2431,8 +2429,9 @@ DevicesStyle {
2431
2429
<xsl:template match="/">
2432
2430
</xsl:template>
2433
2431
</xsl:stylesheet>
2434
- )DOC" , sf.str ());
2435
-
2432
+ )DOC" ,
2433
+ sf.str ());
2434
+
2436
2435
m_config->stop ();
2437
2436
}
2438
2437
0 commit comments