We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05586fb commit 60cd591Copy full SHA for 60cd591
x/logic/predicate/features/base64_2.feature
@@ -0,0 +1,28 @@
1
+Feature: base64/2
2
+ This feature is to test the base64/2 predicate.
3
+
4
+ @great_for_documentation
5
+ Scenario: Encode and decode a string into a Base64 encoded atom
6
+ This scenario demonstrates how to encode an decode a plain string into a Base64-encoded atom using the `base64/2`
7
+ predicate.
8
9
+ Given the query:
10
+ """ prolog
11
+ base64url('Hello world', Encoded),
12
+ base64url(Decoded, 'SGVsbG8gd29ybGQ').
13
+ """
14
+ When the query is run
15
+ Then the answer we get is:
16
+ """ yaml
17
+ height: 42
18
+ gas_used: 3976
19
+ answer:
20
+ has_more: false
21
+ variables: ["Encoded", "Decoded"]
22
+ results:
23
+ - substitutions:
24
+ - variable: Encoded
25
+ expression: "'SGVsbG8gd29ybGQ'"
26
+ - variable: Decoded
27
+ expression: "'Hello world'"
28
0 commit comments