From c852df011e642d126d06139f9a3bb955c59f6dc5 Mon Sep 17 00:00:00 2001 From: sgrekhov Date: Thu, 31 Aug 2023 11:23:43 +0300 Subject: [PATCH] #2242. Add LFCR line ending test --- .gitattributes | 1 + .../Lexical_Rules/line_endings_lfcr_t01.dart | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Language/Reference/Lexical_Rules/line_endings_lfcr_t01.dart diff --git a/.gitattributes b/.gitattributes index 2064359c2e..503a6b6422 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ # Tests below shouldn't be part end-of-line conversion upon checkin or checkout Language/Reference/Lexical_Rules/line_endings_cr_t01.dart -text Language/Reference/Lexical_Rules/line_endings_crlf_t01.dart text eol=crlf +Language/Reference/Lexical_Rules/line_endings_lfcr_t01.dart -text diff --git a/Language/Reference/Lexical_Rules/line_endings_lfcr_t01.dart b/Language/Reference/Lexical_Rules/line_endings_lfcr_t01.dart new file mode 100644 index 0000000000..a9b476d2c7 --- /dev/null +++ b/Language/Reference/Lexical_Rules/line_endings_lfcr_t01.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + + /// @assertion Dart source text is represented as a sequence of Unicode code + /// points. + /// + /// @description Checks that Dart program may use LFCR line endings + /// @author sgrekhov22@gmail.com + + String hello() => "Hello"; + + class World { + String world() { + return "World!"; + } + } + + main() { + print(hello() + " " + World().world()); + } + \ No newline at end of file