diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:43 +0000 |
commit | 3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245 (patch) | |
tree | daf049b282ab10e8c3d03e409b3cd84ff3f7690c /tests/ui-fulldeps/fluent-messages/test.rs | |
parent | Adding debian version 1.68.2+dfsg1-1. (diff) | |
download | rustc-3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245.tar.xz rustc-3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui-fulldeps/fluent-messages/test.rs')
-rw-r--r-- | tests/ui-fulldeps/fluent-messages/test.rs | 68 |
1 files changed, 32 insertions, 36 deletions
diff --git a/tests/ui-fulldeps/fluent-messages/test.rs b/tests/ui-fulldeps/fluent-messages/test.rs index 4e8147e2b..66575eb8e 100644 --- a/tests/ui-fulldeps/fluent-messages/test.rs +++ b/tests/ui-fulldeps/fluent-messages/test.rs @@ -21,78 +21,74 @@ pub enum SubdiagnosticMessage { mod missing_absolute { use super::fluent_messages; - fluent_messages! { - missing_absolute => "/definitely_does_not_exist.ftl", -//~^ ERROR could not open Fluent resource - } + fluent_messages! { "/definitely_does_not_exist.ftl" } + //~^ ERROR could not open Fluent resource } mod missing_relative { use super::fluent_messages; - fluent_messages! { - missing_relative => "../definitely_does_not_exist.ftl", -//~^ ERROR could not open Fluent resource - } + fluent_messages! { "../definitely_does_not_exist.ftl" } + //~^ ERROR could not open Fluent resource } mod missing_message { use super::fluent_messages; - fluent_messages! { - missing_message => "./missing-message.ftl", -//~^ ERROR could not parse Fluent resource - } + fluent_messages! { "./missing-message.ftl" } + //~^ ERROR could not parse Fluent resource } mod duplicate { use super::fluent_messages; - fluent_messages! { -//~^ ERROR the name `a_b_key` is defined multiple times - a => "./duplicate-a.ftl", - a_b => "./duplicate-a-b.ftl", -//~^ ERROR overrides existing message: `a_b_key` - } + fluent_messages! { "./duplicate.ftl" } + //~^ ERROR overrides existing message: `no_crate_a_b_key` } mod slug_with_hyphens { use super::fluent_messages; - fluent_messages! { - slug_with_hyphens => "./slug-with-hyphens.ftl", -//~^ ERROR name `slug_with_hyphens_this-slug-has-hyphens` contains a '-' character - } + fluent_messages! { "./slug-with-hyphens.ftl" } + //~^ ERROR name `no_crate_this-slug-has-hyphens` contains a '-' character } mod label_with_hyphens { use super::fluent_messages; - fluent_messages! { - label_with_hyphens => "./label-with-hyphens.ftl", -//~^ ERROR attribute `label-has-hyphens` contains a '-' character - } + fluent_messages! { "./label-with-hyphens.ftl" } + //~^ ERROR attribute `label-has-hyphens` contains a '-' character } mod valid { use super::fluent_messages; - fluent_messages! { - valid => "./valid.ftl", - } + fluent_messages! { "./valid.ftl" } - use self::fluent_generated::{DEFAULT_LOCALE_RESOURCES, valid_key}; + mod test_generated { + use super::{fluent_generated::no_crate_key, DEFAULT_LOCALE_RESOURCE}; + } } mod missing_crate_name { use super::fluent_messages; - fluent_messages! { - test_crate => "./missing-crate-name.ftl", -//~^ ERROR name `test-crate_foo` contains a '-' character -//~| ERROR name `with-hyphens` contains a '-' character -//~| ERROR name `with-hyphens` does not start with the crate name + fluent_messages! { "./missing-crate-name.ftl" } + //~^ ERROR name `no-crate_foo` contains a '-' character + //~| ERROR name `with-hyphens` contains a '-' character + //~| ERROR name `with-hyphens` does not start with the crate name + + mod test_generated { + use super::{ + fluent_generated::{no_crate_foo, with_hyphens}, + DEFAULT_LOCALE_RESOURCE, + }; } +} + +mod missing_message_ref { + use super::fluent_messages; - use self::fluent_generated::{DEFAULT_LOCALE_RESOURCES, test_crate_foo, with_hyphens}; + fluent_messages! { "./missing-message-ref.ftl" } + //~^ ERROR referenced message `message` does not exist } |