Skip to content

Commit 33a7121

Browse files
committed
build: correct formatting
1 parent 53e527f commit 33a7121

34 files changed

+157
-54
lines changed

postgresql_commands/src/clusterdb.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ mod tests {
280280
let command_prefix = r#"".\\clusterdb" "#;
281281

282282
assert_eq!(
283-
format!(r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#),
283+
format!(
284+
r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#
285+
),
284286
command.to_command_string()
285287
);
286288
}
@@ -311,7 +313,9 @@ mod tests {
311313
let command_prefix = String::new();
312314

313315
assert_eq!(
314-
format!(r#"{command_prefix}"clusterdb" "--all" "--dbname" "dbname" "--echo" "--quiet" "--table" "table" "--verbose" "--version" "--help" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password" "--maintenance-db" "postgres""#),
316+
format!(
317+
r#"{command_prefix}"clusterdb" "--all" "--dbname" "dbname" "--echo" "--quiet" "--table" "table" "--verbose" "--version" "--help" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password" "--maintenance-db" "postgres""#
318+
),
315319
command.to_command_string()
316320
);
317321
}

postgresql_commands/src/createdb.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ mod tests {
385385
let command_prefix = r#"".\\createdb" "#;
386386

387387
assert_eq!(
388-
format!(r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#),
388+
format!(
389+
r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#
390+
),
389391
command.to_command_string()
390392
);
391393
}
@@ -424,7 +426,9 @@ mod tests {
424426
let command_prefix = String::new();
425427

426428
assert_eq!(
427-
format!(r#"{command_prefix}"createdb" "--tablespace" "pg_default" "--echo" "--encoding" "UTF8" "--locale" "en_US.UTF-8" "--lc-collate" "en_US.UTF-8" "--lc-ctype" "en_US.UTF-8" "--icu-locale" "en_US" "--icu-rules" "standard" "--locale-provider" "icu" "--owner" "postgres" "--strategy" "wal_log" "--template" "template0" "--version" "--help" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password" "--maintenance-db" "postgres" "testdb" "Test Database""#),
429+
format!(
430+
r#"{command_prefix}"createdb" "--tablespace" "pg_default" "--echo" "--encoding" "UTF8" "--locale" "en_US.UTF-8" "--lc-collate" "en_US.UTF-8" "--lc-ctype" "en_US.UTF-8" "--icu-locale" "en_US" "--icu-rules" "standard" "--locale-provider" "icu" "--owner" "postgres" "--strategy" "wal_log" "--template" "template0" "--version" "--help" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password" "--maintenance-db" "postgres" "testdb" "Test Database""#
431+
),
428432
command.to_command_string()
429433
);
430434
}

postgresql_commands/src/createuser.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,9 @@ mod tests {
462462
let command_prefix = r#"".\\createuser" "#;
463463

464464
assert_eq!(
465-
format!(r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#),
465+
format!(
466+
r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#
467+
),
466468
command.to_command_string()
467469
);
468470
}
@@ -508,7 +510,9 @@ mod tests {
508510
let command_prefix = String::new();
509511

510512
assert_eq!(
511-
format!(r#"{command_prefix}"createuser" "--with-admin" "admin" "--connection-limit" "10" "--createdb" "--no-createdb" "--echo" "--member-of" "member" "--inherit" "--no-inherit" "--login" "--no-login" "--with-member" "member" "--pwprompt" "--createrole" "--no-createrole" "--superuser" "--no-superuser" "--valid-until" "2021-12-31" "--version" "--interactive" "--bypassrls" "--no-bypassrls" "--replication" "--no-replication" "--help" "--host" "localhost" "--port" "5432" "--username" "username" "--no-password" "--password""#),
513+
format!(
514+
r#"{command_prefix}"createuser" "--with-admin" "admin" "--connection-limit" "10" "--createdb" "--no-createdb" "--echo" "--member-of" "member" "--inherit" "--no-inherit" "--login" "--no-login" "--with-member" "member" "--pwprompt" "--createrole" "--no-createrole" "--superuser" "--no-superuser" "--valid-until" "2021-12-31" "--version" "--interactive" "--bypassrls" "--no-bypassrls" "--replication" "--no-replication" "--help" "--host" "localhost" "--port" "5432" "--username" "username" "--no-password" "--password""#
515+
),
512516
command.to_command_string()
513517
);
514518
}

postgresql_commands/src/dropdb.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ mod tests {
265265
let command_prefix = r#"".\\dropdb" "#;
266266

267267
assert_eq!(
268-
format!(r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#),
268+
format!(
269+
r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#
270+
),
269271
command.to_command_string()
270272
);
271273
}
@@ -295,7 +297,9 @@ mod tests {
295297
let command_prefix = String::new();
296298

297299
assert_eq!(
298-
format!(r#"{command_prefix}"dropdb" "--echo" "--force" "--interactive" "--version" "--if-exists" "--help" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password" "--maintenance-db" "postgres" "dbname""#),
300+
format!(
301+
r#"{command_prefix}"dropdb" "--echo" "--force" "--interactive" "--version" "--if-exists" "--help" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password" "--maintenance-db" "postgres" "dbname""#
302+
),
299303
command.to_command_string()
300304
);
301305
}

postgresql_commands/src/dropuser.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ mod tests {
229229
let command_prefix = r#"".\\dropuser" "#;
230230

231231
assert_eq!(
232-
format!(r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#),
232+
format!(
233+
r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#
234+
),
233235
command.to_command_string()
234236
);
235237
}
@@ -256,7 +258,9 @@ mod tests {
256258
let command_prefix = String::new();
257259

258260
assert_eq!(
259-
format!(r#"{command_prefix}"dropuser" "--echo" "--interactive" "--version" "--if-exists" "--help" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password""#),
261+
format!(
262+
r#"{command_prefix}"dropuser" "--echo" "--interactive" "--version" "--if-exists" "--help" "--host" "localhost" "--port" "5432" "--username" "postgres" "--no-password" "--password""#
263+
),
260264
command.to_command_string()
261265
);
262266
}

postgresql_commands/src/ecpg.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ mod tests {
261261
let command_prefix = String::new();
262262

263263
assert_eq!(
264-
format!(r#"{command_prefix}"ecpg" "-c" "-C" "mode" "-D" "symbol" "-h" "-i" "-I" "directory" "-o" "outfile" "-r" "behavior" "--regression" "-t" "--version" "--help""#),
264+
format!(
265+
r#"{command_prefix}"ecpg" "-c" "-C" "mode" "-D" "symbol" "-h" "-i" "-I" "directory" "-o" "outfile" "-r" "behavior" "--regression" "-t" "--version" "--help""#
266+
),
265267
command.to_command_string()
266268
);
267269
}

postgresql_commands/src/initdb.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,9 @@ mod tests {
583583
let command_prefix = String::new();
584584

585585
assert_eq!(
586-
format!(r#"{command_prefix}"initdb" "--auth" "md5" "--auth-host" "md5" "--auth-local" "md5" "--pgdata" "pgdata" "--encoding" "UTF8" "--allow-group-access" "--icu-locale" "en_US" "--icu-rules" "phonebook" "--data-checksums" "--locale" "en_US" "--lc-collate" "en_US" "--lc-ctype" "en_US" "--lc-messages" "en_US" "--lc-monetary" "en_US" "--lc-numeric" "en_US" "--lc-time" "en_US" "--no-locale" "--locale-provider" "icu" "--pwfile" ".pwfile" "--text-search-config" "english" "--username" "postgres" "--pwprompt" "--waldir" "waldir" "--wal-segsize" "1" "--set" "timezone=UTC" "--debug" "--discard-caches" "--directory" "directory" "--no-clean" "--no-sync" "--no-instructions" "--show" "--sync-only" "--version" "--help""#),
586+
format!(
587+
r#"{command_prefix}"initdb" "--auth" "md5" "--auth-host" "md5" "--auth-local" "md5" "--pgdata" "pgdata" "--encoding" "UTF8" "--allow-group-access" "--icu-locale" "en_US" "--icu-rules" "phonebook" "--data-checksums" "--locale" "en_US" "--lc-collate" "en_US" "--lc-ctype" "en_US" "--lc-messages" "en_US" "--lc-monetary" "en_US" "--lc-numeric" "en_US" "--lc-time" "en_US" "--no-locale" "--locale-provider" "icu" "--pwfile" ".pwfile" "--text-search-config" "english" "--username" "postgres" "--pwprompt" "--waldir" "waldir" "--wal-segsize" "1" "--set" "timezone=UTC" "--debug" "--discard-caches" "--directory" "directory" "--no-clean" "--no-sync" "--no-instructions" "--show" "--sync-only" "--version" "--help""#
588+
),
587589
command.to_command_string()
588590
);
589591
}

postgresql_commands/src/oid2name.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ mod tests {
266266
let command_prefix = r#"".\\oid2name" "#;
267267

268268
assert_eq!(
269-
format!(r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#),
269+
format!(
270+
r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#
271+
),
270272
command.to_command_string()
271273
);
272274
}
@@ -296,7 +298,9 @@ mod tests {
296298
let command_prefix = String::new();
297299

298300
assert_eq!(
299-
format!(r#"{command_prefix}"oid2name" "--filenode" "filenode" "--indexes" "--oid" "oid" "--quiet" "--tablespaces" "--system-objects" "--table" "table" "--version" "--extended" "--help" "--dbname" "dbname" "--host" "localhost" "--port" "5432" "--username" "username""#),
301+
format!(
302+
r#"{command_prefix}"oid2name" "--filenode" "filenode" "--indexes" "--oid" "oid" "--quiet" "--tablespaces" "--system-objects" "--table" "table" "--version" "--extended" "--help" "--dbname" "dbname" "--host" "localhost" "--port" "5432" "--username" "username""#
303+
),
300304
command.to_command_string()
301305
);
302306
}

postgresql_commands/src/pg_amcheck.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,9 @@ mod tests {
545545
let command_prefix = r#"".\\pg_amcheck" "#;
546546

547547
assert_eq!(
548-
format!(r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#),
548+
format!(
549+
r#"{command_prefix}"--host" "localhost" "--port" "5432" "--username" "postgres""#
550+
),
549551
command.to_command_string()
550552
);
551553
}
@@ -597,7 +599,9 @@ mod tests {
597599
let command_prefix = String::new();
598600

599601
assert_eq!(
600-
format!(r#"{command_prefix}"pg_amcheck" "--all" "--database" "database" "--exclude-database" "exclude_database" "--index" "index" "--exclude-index" "exclude_index" "--relation" "relation" "--exclude-relation" "exclude_relation" "--schema" "schema" "--exclude-schema" "exclude_schema" "--table" "table" "--exclude-table" "exclude_table" "--no-dependent-indexes" "--no-dependent-toast" "--no-strict-names" "--exclude-toast-pointers" "--on-error-stop" "--skip" "skip" "--startblock" "start_block" "--endblock" "end_block" "--heapallindexed" "--parent-check" "--rootdescend" "--host" "localhost" "--port" "5432" "--username" "username" "--no-password" "--password" "--maintenance-db" "maintenance_db" "--echo" "--jobs" "jobs" "--progress" "--verbose" "--version" "--install-missing" "--help""#),
602+
format!(
603+
r#"{command_prefix}"pg_amcheck" "--all" "--database" "database" "--exclude-database" "exclude_database" "--index" "index" "--exclude-index" "exclude_index" "--relation" "relation" "--exclude-relation" "exclude_relation" "--schema" "schema" "--exclude-schema" "exclude_schema" "--table" "table" "--exclude-table" "exclude_table" "--no-dependent-indexes" "--no-dependent-toast" "--no-strict-names" "--exclude-toast-pointers" "--on-error-stop" "--skip" "skip" "--startblock" "start_block" "--endblock" "end_block" "--heapallindexed" "--parent-check" "--rootdescend" "--host" "localhost" "--port" "5432" "--username" "username" "--no-password" "--password" "--maintenance-db" "maintenance_db" "--echo" "--jobs" "jobs" "--progress" "--verbose" "--version" "--install-missing" "--help""#
604+
),
601605
command.to_command_string()
602606
);
603607
}

postgresql_commands/src/pg_archivecleanup.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ mod tests {
192192
let command_prefix = String::new();
193193

194194
assert_eq!(
195-
format!(r#"{command_prefix}"pg_archivecleanup" "-d" "-n" "--version" "-x" "partial" "--help" "archive_location" "000000010000000000000001""#),
195+
format!(
196+
r#"{command_prefix}"pg_archivecleanup" "-d" "-n" "--version" "-x" "partial" "--help" "archive_location" "000000010000000000000001""#
197+
),
196198
command.to_command_string()
197199
);
198200
}

0 commit comments

Comments
 (0)