summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGreg de Lima <8351200+GD-L@users.noreply.github.com>2023-02-13 11:12:01 -0500
committerGitHub <noreply@github.com>2023-02-13 17:12:01 +0100
commit4ae9e07ddc8ca344f27c2d56b060fda66d5f2972 (patch)
treeb2b5e9d6d8a60c099519bfde20b462a9190a2285 /tests
parentbeed6143ec0587e7c6a481ffcf797f07219964f1 (diff)
downloadpygments-git-4ae9e07ddc8ca344f27c2d56b060fda66d5f2972.tar.gz
Add new lexer for DAX (#2335)
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
Diffstat (limited to 'tests')
-rw-r--r--tests/examplefiles/dax/dax_example1.dax11
-rw-r--r--tests/examplefiles/dax/dax_example1.dax.output45
2 files changed, 56 insertions, 0 deletions
diff --git a/tests/examplefiles/dax/dax_example1.dax b/tests/examplefiles/dax/dax_example1.dax
new file mode 100644
index 00000000..39b48891
--- /dev/null
+++ b/tests/examplefiles/dax/dax_example1.dax
@@ -0,0 +1,11 @@
+/* This calculation sums sales divided
+by days in the month
+multiplied by current MTD
+*/
+Total Sales Spread = (
+ --This line does a calculate
+ CALCULATE (
+ SUM ( TABLE1[SALES]),
+ PBCS_PLAN_FCST[Scenario] = "Plan"
+ ) / 'Days in Month'[Days in Month Value]
+) * 'Current MTD'[Current MTD Value] \ No newline at end of file
diff --git a/tests/examplefiles/dax/dax_example1.dax.output b/tests/examplefiles/dax/dax_example1.dax.output
new file mode 100644
index 00000000..107cde5a
--- /dev/null
+++ b/tests/examplefiles/dax/dax_example1.dax.output
@@ -0,0 +1,45 @@
+'/*' Comment.Multiline
+' This calculation sums sales divided\nby days in the month \nmultiplied by current MTD\n' Comment.Multiline
+
+'*/' Comment.Multiline
+'\n' Text.Whitespace
+
+'Total Sales Spread = (\n' Text
+
+' ' Text.Whitespace
+'--This line does a calculate\n' Comment.Single
+
+' ' Text.Whitespace
+'CALCULATE' Name.Function
+' ' Text.Whitespace
+'(' Punctuation
+'\n ' Text.Whitespace
+'SUM' Name.Function
+' ' Text.Whitespace
+'(' Punctuation
+' ' Text.Whitespace
+'TABLE1[SALES]' Name.Attribute
+')' Punctuation
+',' Punctuation
+'\n ' Text.Whitespace
+'PBCS_PLAN_FCST[Scenario]' Name.Attribute
+' ' Text.Whitespace
+'=' Operator
+' ' Text.Whitespace
+'"' Literal.String
+'Plan' Literal.String
+'"' Literal.String
+'\n ' Text.Whitespace
+')' Punctuation
+' ' Text.Whitespace
+'/' Operator
+' ' Text.Whitespace
+"'Days in Month'[Days in Month Value]" Name.Attribute
+'\n' Text.Whitespace
+
+')' Punctuation
+' ' Text.Whitespace
+'*' Operator
+' ' Text.Whitespace
+"'Current MTD'[Current MTD Value]" Name.Attribute
+'\n' Text.Whitespace