summaryrefslogtreecommitdiff
path: root/tests/examplefiles/example2.cpp
diff options
context:
space:
mode:
authorMiikka Salminen <miikka.salminen@gmail.com>2016-02-06 22:01:49 +0200
committerMiikka Salminen <miikka.salminen@gmail.com>2016-02-06 22:01:49 +0200
commitc48f13eec64f066766b95751c8033e5127964560 (patch)
tree8503f0509fd792353e051f2dba7fd4df20e62275 /tests/examplefiles/example2.cpp
parente79c9a4b8b79ae8e4271b3a3779aa4286d85ee9c (diff)
downloadpygments-git-c48f13eec64f066766b95751c8033e5127964560.tar.gz
Add tokens for string affixes and heredoc delimiters. Add lexing for them in C/C++, Perl, PHP, Python and Ruby. Update my old style Lovelace accordingly.
Diffstat (limited to 'tests/examplefiles/example2.cpp')
-rw-r--r--tests/examplefiles/example2.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/examplefiles/example2.cpp b/tests/examplefiles/example2.cpp
new file mode 100644
index 00000000..ccd99383
--- /dev/null
+++ b/tests/examplefiles/example2.cpp
@@ -0,0 +1,20 @@
+/*
+ * A Test file for the different string literals.
+ */
+
+#include <iostream>
+
+int main() {
+ char *_str = "a normal string";
+ wchar_t *L_str = L"a wide string";
+ char *u8_str = u8"utf-8 string";
+ char16_t *u_str = u"utf-16 string";
+ char32_t *U_str = U"utf-32 string";
+ char *R_str = R""""(raw string with
+"""
+as a delimiter)"""";
+
+ std::cout << R_str << std::endl;
+
+ return 0;
+}